Sunday, July 26, 2009

JavaScript forEach equivalent

Here's a short example of doing the forEach loop equivalent in JavaScript:
var names = ["Chris","Kate","Steve"];

for ( var i in names )
{
   alert( names[i] );
}

0 comments:

Post a Comment