pav
5/7/2013 - 7:17 PM

Text strings are fundamentally arrays of characters. We can get individual characters from a string the same way we do elements of an array:

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]);
}