Given the snippet code from Javascript the good parts (page 24):
var name;
for (name in another_stooge) {
if (typeof another_stooge[name] !== 'function') {
document.writeln(name + ": " + another_stooge[name]);
}
}
Why there is definition of variable name
before use in for in
loop, since it will work without it?