JavaScript Tutorial - Classes

Pubblicato il: 06 ottobre 2017
sul canale di: 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();


In questa pagina del sito puoi guardare il video online JavaScript Tutorial - Classes della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Struct Feed 06 ottobre 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 380 volte e gli è piaciuto 7 spettatori. Buona visione!