解释一段使用&&运算符的JavaScript代码?

解释一段使用&&运算符的JavaScript代码?,javascript,Javascript,我对这段代码有点困惑。我真的很想一步一步地走过去 i = 0; !(i % 3 && i % 5) && arr.push(i), i++ 逐步演练: i = 0; // assignment of 0 to the global variable i// !// the opposite of the following expression, note does not apply to //expression not in parentheses b

我对这段代码有点困惑。我真的很想一步一步地走过去

 i = 0;
 !(i % 3 && i % 5) && arr.push(i), i++

逐步演练:

i = 0; // assignment of 0 to the global variable i//
!// the opposite of the following expression, note does not apply to
//expression not in parentheses below // 
(i % 3 && i % 5) // returns
//true if i does  
// equal zero for both i % 3 and i % 5 // in javascript 0 is a falsy 
//value
&& arr.push(i) // returns true if the length property of arr is not
// 0, i++

澄清一下-您对它有什么不了解?甚至不了解%3&&甚至不了解%3,arr.pushi也是,i=i+1i=0;如果i%3==0 | | i%5==0{arr.pushi;}i++&&运算符用于评估条件true&&true、false&&true的各个方面,因此如果!i%3&&i%5它将去求值&&arr.pushi,并且,是用于声明的串联,下一个语句用于分隔可能重复的