4 ms·
I'm a JS noob, but I though 'length' was not enumerable (i.e. its 'enumerable' property is set to 'false'). Edit: I think I missed what you said. You're saying
by pooriaazimi 14y ago
I'm a JS noob, but I though 'length' was not enumerable (i.e. its 'enumerable' property is set to 'false').
Edit: I think I missed what you said. You're saying it's "like" and array, but unlike arrays its `length` is enumerable. I'll leave my comment so other skeptics can benefit :)
Edit2: This is what I was referring to (read the 'Note' at the right side): http://bonsaiden.github.com/JavaScript-Garden/#object.forinloop http://bonsaiden.github.com/JavaScript-Garden/#object.forinl...
- nailer 14y agoLooks like this is correct: paras = document.getElementsByTagName('p') for (var para in paras) { console.log(para)} 0 1 ... 9 10 length item