JavaScript必知必会(六) delete in instanceof

时间:2020-11-23 09:25:26
【文件属性】:
文件名称:JavaScript必知必会(六) delete in instanceof
文件大小:32KB
文件格式:PDF
更新时间:2020-11-23 09:25:26
c ce ceo in in 判断 左边 的字符串或者能转换成字符串的是否属于 右边 的属性。 var data = { x: , y: };//定义了直接对象 alert("x" in data);//true ,x 是data 的一个属性 alert( in data);//false , 是data的属性值。 var arr = [, , ];//定义了直接数组对象 alert( in arr);//true ,arr 数组的index包括,,, 是他的一个[]属性。 alert( in arr);//false ,不是他的属性。 instanceof instanceof 希望左边的实例是右边

网友评论