JavaScript笔记(JavaScript notes)

0. 对象的分类:

  内建对象:由ES标准定义,如:Math String Number Boolean Function Object…

  宿主对象:由JS运行环境提供,主要指浏览器,如:DOM  BOM

  自定义对象:由开发人员新建的对象

1. 删除对象属性:

var obj = new Object();
obj.name = "tom";
obj.age = 20;
console.log(obj);
delete obj.name;
console.log(obj.name);
————————

0. Classification of objects:

Built in object: defined by ES standard, such as math string number Boolean function object

Host object: provided by the JS running environment, mainly refers to the browser, such as Dom and BOM

Custom object: an object created by a developer

1. Delete object attribute:

var obj = new Object();
obj.name = "tom";
obj.age = 20;
console.log(obj);
delete obj.name;
console.log(obj.name);