Joined July 2013
·

Atul Yadav

Software Engineer at Network 18
·
Mumbai Area, India
·
·
·

This works all the time:

JS Array

var someArray = ['one', 'two', 'three'];
for ( var i in someArray ) {
      console.log( someArray[i] );
}
</code></pre>

JSON Array

var someArray = [ {'id': 1, 'name': 'foo'}, {'id': 2, 'name': 'bar'} ];
for ( var i in someArray ) {
      console.log( someArray[i].id );
      console.log( someArray[i].name );
}
</code></pre>
Achievements
29 Karma
3,791 Total ProTip Views
Interests & Skills