javascript loop sample
var i = 1 ; list . forEach ( function ( item ) { console . log ( item ); item . ranking = i ++; }); var obj = { a: 1 , b: 2 , c: 3 }; for ( var key in obj ) { console . log ( key , obj [ key ]); }