JavaScript Tutorial - Classes

Published: 06 October 2017
on channel: Struct Feed
380
7

In this video I go over creating a class in JavaScript. Classes give us a convenient syntax to define state and behavior of objects. To create a class....you write "class" keyword followed by the name of the class. The class body then follows.

The class body can only contain method definitions.

You initialize your object's properties inside the constructor.

The constructor is a special method that is called automatically (when craeting an instance of the object) so that we don't forget to initialize our object.

To use the class you have to use the new keyword

var a = new classname();


On this page of the site you can watch the video online JavaScript Tutorial - Classes with a duration of hours minute second in good quality, which was uploaded by the user Struct Feed 06 October 2017, share the link with friends and acquaintances, this video has already been watched 380 times on youtube and it was liked by 7 viewers. Enjoy your viewing!