当前位置:网站首页>[]==! []

[]==! []

2022-06-11 06:28:00 Saucey_ six

Why? []==![] The final running result is true, What kind of transformation has taken place inside

  1. ! Operator priority ratio == high , So, first of all, we calculate ![], obtain false.
  2. false In the operation, it will be cast to 0.
  3. [] Cast to original type “”.
  4. “” Will be cast to 0.
  5. On both sides number The type is 0, therefore 0==0 by true.

 Insert picture description here

原网站

版权声明
本文为[Saucey_ six]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110623220410.html