为什么要 new一个var H5 = new H5ComponentBase?
来源:3-5 通用图文组件类-H5ComponentBase(参数设置)
 
			K_TonyYu
2016-04-21
如果不使用new,应该也可以return 一个component,其中new应该如何理解
写回答
	3回答
- 
				
				上面的代码和视频中的 new 是同一个作用,上面的代码使用了闭包。每次执行,都申请了一个「新」的 component 012016-05-22
- 
				  Lyn_Tech 2016-04-24 var H5ComponentBase = function(id){ var component = {}; component.id = id; return component; } var a = H5ComponentBase( 'aa'); var b = H5ComponentBase( 'bb');是这个意思吗? 112016-04-26
- 
				  K_TonyYu 提问者 2016-05-03 对,请问老师,因该如何理解new 00
相似问题
 
						