JS中in和typeof和instanceof的含义和作用

JS中in和typeof和instanceof的含义和作用

  • typeof它是一个函数或是一个语言结构。typeof(a)、 typeof a; 用于判断变量的数据类型。
  • in – 用于判断下标是否存在数组中,或判断对象中是否有哪个成员
  • instanceof – 判断对象的原型 ​​​​
Copyright [2018] by [羊驼可以吃吗] form [https://www.cnblogs.com/phpisfirst/]
原文地址:https://www.cnblogs.com/phpisfirst/p/9792581.html