SOURCE

// 工厂方法
function Person(name, age) {
    var p = new Object();
    p.name = name
    p.age = age
    return p
}

var person1 = Person('jack', 32)
console.log(person1.name)
console.log(person1.age)
console 命令行工具 X clear

                    
>
console