I'm creating a loop which finds all elements in a class that contain the character 'L' and performing an innerHTML command to each. This loop seems to work fine until I get to actually do i.innerHTML = '', where the i's is the array for L strings. Why can't I do it like this? If I do a console.log(i); inside the if statement I get the correct array.
letts = document.getElementsByClassName('span2');
for(i in letts){
if(i.indexOf('L') !== -1){
i.innerHTML = '';
}
}