JS判断类型的几种方式

1.typeof

2.instanceof

3.constructor

4.Object.prototype.toString.call([])

5.Array.isArray()

 
posted @ 2023-08-18 15:16  乐得逍遥  阅读(26)  评论(0)    收藏  举报