Hi !
Could you remind me the use of 'for... in...' ?
Thanx !
For... in...
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
untested
Code: Select all
var buf = new Array();
for(var i in window)
{
buf[buf.length] = 'window[' + i + '] = ' + (typeof(window[i]) == 'string' ? '"' + window[i].replace('\\','\\\\').replace('"','\\"') + '"' : window[i].toString());
}
alert(buf.join('\n'));