我在polyfill中看到了这些片段this https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/repeatMDN 文档:
// Casts the value of the variable to a number.
// So far I understand it ...
count = +count;
// ... and here my understanding ends.
if (count != count) {
count = 0;
}
我不知道目的。
事物本身怎么可能不平等呢?
在 JavaScript 中,NaN 是唯一不等于其自身的值。这是对 NaN 的检查。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)