I’m trying to write a simple for loop and I keep getting this error:
missing ; after for loop initializer.
I can’t seem to figure out why. cleari is an array of input fields. So, I’m basically trying to take each field in the array, and reset it:
var cleari = document.getElementById(rowNum).getElementsByTagName('input');
for (cleari) {
cleari.parentNode.innerHTML = cleari.parentNode.innerHTML;
}
A for loop is of the convention
for(a;b;c)For example:
A
whileloop is of the conventionwhile(a)For example:
So for your example what you can do is: