var string = "The quick brown fox jumps over the lazy dog";
var words = string.split(" ");
for (var i in words) {
console.log(typeof i) // "string"
console.log(i) // 0,1,2,3...n
}
I just found out that the type of i in the for loop is a string in this case. Why?
forloop.