您的位置:首页 > Web前端 > JavaScript

JS 一些知识点补漏

2017-07-12 10:38 225 查看
var array=['1','2','3','fdy'];
for(var x=0;x<array.length;x++){
console.log(array[x]);

}
for(var x in array){
console.log(array[x]);
}
array.forEach(function(element) {
console.log(element);
});
person=new Object();
person.firstname="Bill";
person.lastname="Gates";
person.age=56;
person.eyecolor="blue";
console.log("----"+person.age);
var Student={
name:'fdy',
age:23,
id:1009
};
console.log(Student.id);
Student.hieht=180;
delete Student.hieht;
console.log(Student.hieht);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: