November 2018
Beginner
502 pages
10h 22m
English
Classes have lots of features. So, in this section we'll look at the basic features of a class. We use the class keyword followed by the class name, followed by the definition of the class.
Let's look at this in more depth with the following example:
class Product { name: string; unitPrice: number;}
const table = new Product();table.name = "Table"; table.unitPrice = 500;
Notice that when we use this approach we don't need ...
Read now
Unlock full access