Young Coder
Published in

Young Coder

Supporting Multiple Constructors in JavaScript

3 patterns for object creation

If your background is in a traditional object-oriented programming language, you might be thrown by the wild and sometimes lawless world of JavaScript. There are objects here — but they’re really prototypes, and all the syntax about classes and inheritance was bolted on in relatively recent versions. Some OO concepts still don’t fit…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store