JavaScript Tutorial
3.33K subscribers
302 photos
17 links
🕹 JavaScript is the 
Programming Language 
for the Web.

🕹 JavaScript can update
and change both 
HTML and CSS.

🕹 JavaScript can calculate, 
manipulate and 
validate data.

Group
@js_group_tut

@javascript_tut
Download Telegram
ES6 class declaration

💎ES6 introduced a new syntax for declaring a class as shown in this example👆

💎This Person class behaves like the Person type in the previous example.

💎However, instead of using a constructor/prototype pattern, it uses the class keyword.

💎In the Person class, the constructor() is where you can initialize the properties of an instance.

💎JavaScript automatically calls the constructor() method when you instantiate an object of the class.


@javascript_tut
'javascripttutorial. net'
The above example creates a new Person object,
which will automatically call the constructor() of the Person class:

@javascript_tut
'javascripttutorial. net'
💎The getName() is called a method of the Person class.

💎Like a constructor function, you can call the methods of a class using the above syntax:

@javascript_tut
'javascripttutorial. net'
To verify the fact that classes are special functions, you can use the typeof operator of to check the type of the Person class.

@javascript_tut
'javascripttutorial. net'
The john object is also an instance of the Person and Object types

@javascript_tut
'javascripttutorial. net'
Forwarded from Ela Car
Build Complete JavaScript Project - Tip Calculator

https://youtu.be/zT9vE41efTk
How to get URL in JavaScript?

@javascript_tut
💎Session Storage
vs
💎Local Storage

@javascript_tut