let arr = ['js', 'python', 'c++', 'dart']
// no 1
for (item of arr) {
console.log(item);
}
// no 2
for (var item = 0; item < arr.length; item++) {
console.log(arr[i]);
}
// no 3
arr.forEach(item=>{
console.log(item);
})
// no 4
arr.map(item=>{
console.log(item);
})
// no 5
var item = 0;
while (item < arr.length) {
console.log(arr[item]);
item++;
}
for (let value of array) {
sum+=value;
}
for (let [key,val] of array.entries()) {
console.log([key,val]);
}