Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
Associative array help needed.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Douglas Crockford, post: 4884476"] That use of eval is totally and completely wrongheaded. Do it right: var i, k, o; var msg = ''; for (i = 0; i < myArray.length; i += 1) { msg += 'Record: ' + i + '\n'; o = myArray[i]; for (k in o) { msg += ' ' + k + ': ' + o[k] '\n'; } } If you ever find yourself using eval, you can be certain that you are doing it wrong. Who taught you to program like that? Where did you learn to use eval so badly? The guilty must be punished. [URL]http://www.crockford.com/javascript/survey.html[/URL][/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
Associative array help needed.
Top