Posted By

saturngod on 03/08/10


Tagged

javascript loop foreach


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jacinmontava


foreach in Javascript


 / Published in: JavaScript
 

URL: http://pietschsoft.com/post/2008/02/28/JavaScript-ForEach-Equivalent.aspx

  1. var names = ["Chris","Kate","Steve"];
  2.  
  3. for ( var i in names )
  4. {
  5. alert( names[i] );
  6. }

Report this snippet  

You need to login to post a comment.