摘要:
一、new function CreateCat(name){ this.name = name; } var catA = new CreateCat('xiaoA'); console.log(catA.name)//xiaoA new做了什么操作: 1. 创建一个空对象 2. 将构造函数的pr 阅读全文
摘要:
普通: var catA = { name:'xiaoA', eat:function(){ console.log('xiaoA eat something') } } var catB = { name:'xiaoB', eat:function(){ console.log('xiaoB ea 阅读全文