Js difference constructor function and a normal function of the

Js difference constructor function and a normal function of the

1. The first letter of the name of the method constructor to be capitalized, normal function is not required.

2. The constructor method calls for: new Show (); general function: show ().

3. constructor class name and method name of the same;

4. The use this constructor configured attributes and methods;

 

Guess you like

Origin www.cnblogs.com/ZhangDaE/p/11610542.html