Created
September 30, 2016 16:11
-
-
Save avand/de4fbacf9b27bad175e9c34dbf116aff to your computer and use it in GitHub Desktop.
This file contains 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
// This is a string... (looks like a list but still a string) | |
var animalsString = "cow,dog,horse,moose,rooster"; | |
// Turn the string into an array... | |
var animalsArray = animalsString.split(","); | |
// Now you can go about looping, like normal... | |
for (var i = 0; i < animalsArray.length; i++) { | |
// animalsArray[i] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment