我知道参数是传递给函数的变量,并为函数中的参数赋值,但我无法理解:
javascript中"arguments"和"parameters"之间的主要区别是什么?
我正在阅读Javascript:The Good Parts,我无法理解他们的"语法"图表.
第一个是空白

我不太清楚如何阅读它,也许一些代码会帮助我理解?
感谢高级人员的帮助.
var tops = 5;
while (tops > 0) {
for (var spins = 0; spins < 3; spins++) {
alert("Top is spinning!");
}
tops = tops - 1;
}
Run Code Online (Sandbox Code Playgroud)
每次 var = tops 减一直到达到值 1 时,var = 自旋不是会循环 2 次吗?那个代码不是会报警8次吗?我不知道为什么我收到了 16 次警报。
它必须只有函数,变量,循环等(基本的东西).从目前为止我学到的东西(从应该能够做到)开始,我无法从头开始编写代码.让我真的很生气:/.如果你能一步一步地给我,以确保我明白我真的很感激.先谢谢了一大堆.
如何使用比这个更简单的代码获得相同的结果:
var primes=4;
for (var counter = 2; counter <= 100; counter = counter + 1)
{
var isPrime = 0;
if(isPrime === 0){
if(counter === 2){console.log(counter);}
else if(counter === 3){console.log(counter);}
else if(counter === 5){console.log(counter);}
else if(counter === 7){console.log(counter);}
else if(counter % 2 === 0){isPrime=0;}
else if(counter % 3 === 0){isPrime=0;}
else if(counter % 5 === 0){isPrime=0;}
else if(counter % 7 === 0){isPrime=0;}
else {
console.log(counter);
primes = primes + 1;
}
}
}
console.log("Counted: "+primes+" primes");
Run Code Online (Sandbox Code Playgroud)