Javascript: From Objects to Factory Functions And Modules

Written by simandebvu | Published 2020/09/02
Tech Story Tags: javascript | object-oriented-design | functional-programming | es6 | ecmascript-6 | coding | tutorial

TLDR Javascript: From Objects to Factory Functions And Modules, we have a way of organizing our Javascript code. We use the constructor to create a constructor with Javascript. Constructors look just like normal regular functions. The only difference now is that you have to instantiate them with the new keyword. This explains why this explains why we have no classes in Javascript, we did not have classes before ES6. We saw that constructors, as an optional way of organising our code, also also serve as a factory function.via the TL;DR App

no story

Written by simandebvu | Full Stack Software Developer | Django | LEMP | Rails | React & Redux
Published by HackerNoon on 2020/09/02