- 对象字面量:
var obj = {};
- 构造函数:
var obj = new Object();
Object.create(): var obj = Object.create(Object.prototype);
javascript有哪些方法定义对象
最新推荐文章于 2022-09-17 23:14:45 发布
var obj = {};
var obj = new Object();
Object.create(): var obj = Object.create(Object.prototype);