How To Loop Through Objects In JavaScript

Published Date Author: , Posted May 15th, 2011 at 3:27:30pm

Coming from the Perl world, I wanted to emulate the following code in JavaScript:

What I found is that JavaScript uses “Objects” to contain hash-style data:

Also, one may use variables as key names by using the square-bracket notation, which evaluates variables first:

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.