Перейти к содержимому

Learn JavaScript 035: Constructor Functions & The 'new' Keyword Explained

Code Kaizen

0:00 / 0:00

Learn JavaScript 035: Constructor Functions & The 'new' Keyword Explained

8 просмотров · 10 дней назад
Code Kaizen
12 подписчиков
8 просмотров · 10 дней назад
Welcome back to the Complete JavaScript Course! Have you ever built an app where you needed to create hundreds of similar objects, like User Profiles or Shopping Cart items? Writing them out one by one violates the golden rule of programming: DRY (Don't Repeat Yourself). It is time to learn how to build blueprints! In this video, we step into the world of Object-Oriented Programming (OOP) by learning how to write Constructor Functions. More importantly, we demystify the magic of the new keyword. I will pull back the curtain and show you the 4 invisible steps JavaScript takes every single time you type new—a classic technical interview question! Finally, we'll look at the massive global bug you create if you ever forget to use it. #JavaScript #WebDevelopment #LearnToCode #ObjectOrientedProgramming #OOP #FrontendDevelopment #SoftwareEngineering #CodingTutorial