March 2018
Intermediate to advanced
592 pages
13h 44m
English
To kick things off, we're going to create a simple class for a person. This means that we're making a set of data and a set of methods that are useful to manipulate Person. Now in order to get started, we are going to use the class keyword followed by the class name, Person. We're going to use an uppercase first letter for our class definition since we are going to be creating new instances of them with the new keyword. You do not need to use an uppercase P; this is just common convention across JavaScript. If a function is meant to be used with new, like new Person, new Object, or anything else, it should have an uppercase first letter; this is just a styling convention.
Now right after our name we can ...