javascript loop through each string char code example
Example 1: js for each character in string
for (var i = 0; i < str.length; i++) {
alert(str.charAt(i));
}
Example 2: javascript iterate through for loop
var myStringArray = ["Hello","World"];
var arrayLength = myStringArray.length;
for (var i = 0; i < arrayLength; i++) {
console.log(myStringArray[i]);
//Do something
}