Can instanceof operator be used to test any value type?

前端 未结 0 1710
無奈伤痛
無奈伤痛 2021-01-02 03:38

Is it safe to use instanceof operator to test any value type?

E.g.

(x instanceof Object) // x is defined, but can be anything, including undefined)


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题