类型检测
typeof instanceof constructor toString
typeof 可以区分简单数据类型
引用数据类型和null 都返回object
function 返回数据类型是function
instanceof 判断是否是某个构造函数的实例 引用数据类型 不能检
constructor 判断构造函数
toString
Object.prototype // 原型对象
__proto__ // 原型
函数的this指向
函数类型 this指向
普通函数 window
匿名函数 window
立即执行函数 window
回调函数 window
箭头函数 函数定义位置的上下文this
对象下的函数 谁调用 指向谁
dom回调 绑定事件的对象
数据类型
基础数据类型
string number boolean undefined null
undefined和null的区别 undefined 未定义 null 定义
复杂数据类型
Object Array Date RegExp