class vs constructor function JavaScript

preview_player
Показать описание
class vs constructor function JavaScript
Рекомендации по теме
Комментарии
Автор

Understood raghu anna🔥 practices complete raghu anna🔥

shaikanwar
Автор

Constructor function have a parenthesis so with the help of that it takes parameters.but the class does not have parenthesis so that's why there is a constructor method to take parameters dynamically. and also if you have to attach a method to a prototype we have to give a constructor name, prototype, method that's a big thing in constructor function.
But in case of classes you will attach a method to a class without using prototype keyword, just using a name of function you can attach a method to a class outside of the constructor method..

rekhaharikaharshita
Автор

I can barely hear you. Please fix the audio volume

bilkisuismail