[Javascript] Correctly Type-Checking Numbers

2020-12-13 02:38

阅读:459

标签:correct   The   span   call   eof   ==   rect   ===   class   

There are two ways to correctly type checks number:

console.log(typeof 99.66); // number
console.log(Object.prototype.toString.call(99) === ‘[object Number]‘); // true

 

[Javascript] Correctly Type-Checking Numbers

标签:correct   The   span   call   eof   ==   rect   ===   class   

原文地址:https://www.cnblogs.com/Answer1215/p/11047884.html


评论


亲,登录后才可以留言!