Created
July 25, 2011 01:33
-
-
Save aaronpowell/1103374 to your computer and use it in GitHub Desktop.
Q3 - To array or not to array?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var array = ??? | |
| function print(x) { | |
| var s = ''; | |
| for(var i = 0, il = x.length; i < il; i++) { | |
| s += (' ' + x[i]); | |
| } | |
| console.log(s); | |
| } | |
| array[0] = 'does'; | |
| array[1] = 'this'; | |
| array[2] = 'work?'; | |
| print(array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment