📅  最后修改于: 2022-03-11 15:04:06.734000             🧑  作者: Mango
//this is an array of number
let array = [00,10,20,30,40,50,60,70,80,90,100]
//for loop with if condition
for (let i = 0; i < array.length; i++) {
if(array[i] >= 50){
console.log("with condition:" + array[i] )
}
}
//for loop without if condition
for (let i = 0; i < array.length; i++) {
// Template literals
console.log(`without condition: ${array[i]}`)
}