posted 1 month ago
[color=#444444] [size=12]
Constructor Function & Prototype in Javascript
What is a constructor function and what it does?
It is a function that creates an object class or the function that allows you to create multiple instances of a class very easily. Constructor function technically speaking is like a normal function but
1) They named with the capital letter first.- it is a best practice to write constructor function first name with a capital letter.
2) They should execute with the new operator.
[/size][/color]