In traditional Object-oriented languages, constructor functions are a normal part of the code. Constructor functions are denoted by a capital letter by practice. Constructor functions look like “regular functions, but behave differently. Here is an example…
Notice the capital "A". This is a JavaScript constructor function convention. Also, notice we are using the “new” keyword. This instantiates the new object based upon the constructor function. We can even pass information to it like we are doing here. What about constructor function methods?
The output will be “ugh!”.