/js_newbie

Primary LanguageJavaScript

A Class is a generlaized description of Objects which fit into the description. For instance, a Class of Humans will fit Male, Female, Boy, Girl, Bob, Alice, etc. a Class of Friuts will fit Mango, Orange, Apple, Tangarin, Grape, etc.

And Object is an instance of a Class. So an instance of a Class of Humans could be "Bob or Alice".

In js, we define as Class Human{ //code } In js, de create an Object by instanciating a Class: const ObjectName = new ClassName;