JavaScript is a prototype-based language

According to the MDN Docs,

A prototype-based language has the notion of a prototypical object, an object used as a template from which to get the initial properties for a new object.

JavaScript introduced the class keyword in ECMAScript 2015. It makes JavaScript seem like an OOP language. But it is just syntatic sugar over the existing prototyping technique. It continues its prototyping in the background but makes the outer body look like OOP.

Comments

Popular posts from this blog

Check MySQL query history from command line

Installing chocolatey on Windows