▼例)「hello」を10回表示させる

for (let i = 1; i <= 10; i++) { //i=1と変数宣言し、iが10以下まで、1ずつ増えながら{}内の処理が繰り返される
    console.log("hello");
}

▼例2)表示される「hello」の隣にカウンターの値も表示させる

for (let i = 1; i <= 10; i++) {
    // console.log("hello" + i); または以下の書き方でOK
    console.log(`hello ${i}`); //←テンプレート文字列(=テンプレートリテラル)
}

→hello 1
 hello 2
 hello 3
  ・
  ・
  ・
 hello 10

▼例3)arryの要素と添字を取得・表示させる

const arry = ['taro','himura','shitara'];

//添字を取得・表示させる
for (let i = 0; i < arry.length; i++) {
		console.log(arry);
}
→ (3)['taro','himura','shitara']
	0:'taro'
	1:'himura'
	2:'shitara'

//要素を取得・表示させる
for (let i = 0; i < arry.length; i++) {
		console.log(arry[i]);
}
→ taro
	himura
	shitara

//おまけ
for (let i = 0; i < arry.length; i++) {
		console.log(i, arry[i]);
}
→ 0 "taro"
	1 "himura"
	2 "shitara"