As the object-oriented language of the most important or object-like concept of the idea of the importance
This explains the class in JS:
We usually say a person:
What characteristics do people have as a normal person
There must be a name, age, ID number.
But a man's name cannot be said to be fixed, everyone's name is different.
The general concept of human being is the class and concrete to everyone is instantiation (new)
Then we can write a person this class this is just a general vague concept of a person
function Person (name, age, id) { this. Name = name; this. Age = Age ; this. id = ID;}
Besides these attributes, people have their own skills in JS which we call methods (function) such as eating and walking
function () { console.log (' work '); }
So specifically to everyone, we're going to give you an example of how to instantiate a Tom when he has a specific age ID name.
var New Person (' Tom ', ' 12 ', ' 123456798 ');
Tom.work ();
Javascrpt Class-oriented objects