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