Skip to content

Instantly share code, notes, and snippets.

@pgainda
Created May 7, 2013 19:17
Show Gist options
  • Save pgainda/5535332 to your computer and use it in GitHub Desktop.
Save pgainda/5535332 to your computer and use it in GitHub Desktop.
Text strings are fundamentally arrays of characters. We can get individual characters from a string the same way we do elements of an array: string[indexNumber].
var word = "code";
// Loop goes here
for(i=0;i<word.length;i++){
console.log(word[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment