美文网首页
NodeJs实用技巧

NodeJs实用技巧

作者: lceCola | 来源:发表于2019-01-04 18:19 被阅读0次

判断数组类型为 Array

Object.prototype.toString.call(obj) == '[object Array]'

判断对象类型为 Object

Object.prototype.toString.call(obj) == '[object Object]'

判断对象类型为 Number

Object.prototype.toString.call(obj) == '[object Number]'

相关文章

网友评论

      本文标题:NodeJs实用技巧

      本文链接:https://www.haomeiwen.com/subject/gumkrqtx.html