function ReplaceContentInContainer(matchClass,content)
{
var elems = document.getElementsByTagName('*'), i;
for (i in elems)
{
if((" "+elems[i].className+" ").indexOf(" "+matchClass+" ") > -1)
{
elems[i].innerHTML = content;
}
}
}
I'm trying to figure out what the comma does in the variable assignment ('*'), i;
and what that means in the for (i in e) loop.
My best guess is that e is assigned to both all the elements in the document node as well as i. So does that mean that i is a count or reference of the number of elements in the array e (is it an array?)?
edit:
Okay. It's just instantiating the variable (i) and then i, in the for loop, counts all the elements in the object elem.