[英]Why does my browser keep crashing when I run this Javascript code?
This is my code: 这是我的代码:
for (var i=1;1<=10;i++) {
console.log(i);
}
var count = 10;
while (count>0) {
console.log(count);
count--;
}
do {
console.log("1 loop");
} while (count === 1000);
The only thing I could think of is an infinite loop, but there doesn't seem to be one to me. 我唯一能想到的就是无限循环,但对我而言似乎没有一个。
您代码的第一行有一个1
而不是一个i
for (var i=1;1<=10;i++) {
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.