for (const v of ['a', 'b', 'c']) {
console.log(v)
}
// get index
for (const [i, v] of ['a', 'b', 'c'].entries()) {
console.log(i, v)
}
for (const [i, v] of ['a', 'b', 'c'].entries()) {
console.log(i, v)
}
const names=["shirshak","Bigyan","Savyata"];
for(let name of names){
console.log(name); //output all name
console.log(names.indexOf(name)); // index 0,1,2
}