我只是在 vs code 的课程中编写一些 JS 代码,在尝试 console.log() 后突然遇到了这个问题
const manav = [
'Manav',
'Aggarwal',
2037 - 2005,
'None',
['Yash', 'Uday', 'Nikhil'],
true
];
// 0, 1, ..... 4
// 4, 3, ..... 0
for(let i = manav.length - 1; i >= 0; i--){
console.log(i, manav[i]);
}
for(let exercise = 1; exercise < 4; exercise++){
console.log(`------------ Starting exercise ${exercise}`);
for (let rep = 1; rep < 6; rep++){
console.log(`Lifting weight repetition ${rep} ️`);
}
}
}
我认为问题在于嵌套 for 循环或实时服务器扩展