key可以遍历出来阿,老师说不可以,是不是我理解错了
<script>
var obj={a:1,b:2,c:3}
//tostring in obj
obj.propertyIsEnumerable("toString");
var key;
for(key in obj){
console.log(key);
}
</script>
<script>
var obj={a:1,b:2,c:3}
//tostring in obj
obj.propertyIsEnumerable("toString");
var key;
for(key in obj){
console.log(key);
}
</script>
2017-02-22
举报