Constructor Function in 1 Minute.
2 min readMar 25, 2020
Online playground to type the examples: https://repl.it/languages/javascript
Once upon a time there were classes in JavaScript.
They CAN (they don’t have to) have these fancy things called constructor functions.
What’s it do?
Really only one thing. It runs every time a new ‘Book’ is made/instantiated.
That’s it. That’s the lesson.
Check out the three examples below, and have a great day!
Find me on Twitter: https://twitter.com/BeaufortAustin