标签:fun color new type dex call index func class
var
obj =
new
Object();
this
指向新创建的空对象obj,并执行Person的函数体 var
result = Person.call(obj);
1 function Person(name, age) { 2 this.name = name; 3 this.age = age;
// return this (默认有这一行返回this对象) 4 } 5 var person = new Person("Alice", 23);
标签:fun color new type dex call index func class
原文地址:https://www.cnblogs.com/chailuG/p/11259530.html