Learn JavaScript Episode #22: Class Constructor, Instance Variables, and Static Variables

Опубликовано: 11 Октябрь 2024
на канале: Joseph Delgadillo
6,113
97

Get The Learn to Code Course Bundle!
https://josephdelgadillo.com/product/...

Subscribe: https://www.youtube.com/c/JosephDelga...

Once our class is created we will need to write a function to call it, and this varies by programming language. In Python you use the init method, in C++, and other C languages, you use the class name, and in JavaScript you use what is called the constructor. This was one the topics when learning object-oriented programming, and maybe I just didn't have the right information, that confused me a bit. So, I hope I have explained constructors, instance variables, and class variables well enough in this video.