javascript中的instance和typeof

1. typeof操作符     typeof操作符可以用来判断变量的数据类型。     对于值类型有四种结果(undefined、string、number、boolean)     对于引用类型有两种结果(function、object)     注意:typeof null==object; 2, instanceof操作符       instanceof操作符用来判断引用类型。     
相关文章
相关标签/搜索