标签: javascript
这两种实例化对象的方式之间是否存在差异/好处?
示例:
var Person = (function () { function Person() { } return Person; })(); var p = new Person(); p.Name = "Greg"; window.console.log(p.Name); var x = new Person; x.Name = "Pete"; window.console.log(x.Name);