JavaScript class

Mohamed Amine Derouiche
1 min readSep 3, 2020

๐Ÿ‘€โคHi guys.I am going to explain to five years old children the JavaScript class.๐Ÿ˜Š๐Ÿ˜‰

A JavaScript class is like a kitchen . In kitchen we have some tools and some ingredients to use . We will use this tools and some ingredients to prepare meals .this tools and ingredients allows you just to cook just other meals not to do another think.

what are the difference between the functional and the functional shared instantiation pattern, which one do you prefer ?

Instantiation patterns, in short, are methods (not necessarily a JavaScript method) by which we can create multiple instances of objects that share the same initial properties/methods. Assuming that you already have a basic understanding of this concept and why you would want to do it, letโ€™s get right into it.

The five main types are:

  • Functional
  • Functional Shared
  • Prototypal
  • Pseudoclassical
  • Pseudoclassical ES6

Each one in the list is generally considered to be better than the last, but I mainly would like to go over their differences abstractly and show some examples.

--

--