for ( var i = 0; i < 10; i++ ) {
// 繰り返し処理
}
var myName = {
name: '名前',
sex: 男性,
age: 21
}
for( var item in user ) {
console.log(item);
}
var lists = [0, 1, 2, 3, 4, 5];
for( var item of lists ) {
console.log( item );
}
var lists = ['リンゴ', 'バナナ', 'メロン'];
lists.forEach( function( value, index ) {
console.log( 'index: ' + index + ' | value: ' + value );
});
var i = 0;
while(i < 10) {
console.log(i++);
}