Grokking TypeScript
0% completed
Classes and Properties
When a program needs many objects with the same properties and the same behavior, it can describe them once and then create as many as it needs. That single description is called a class. A house plan is a fair comparison: the plan says how many rooms each house has, but no one lives in the plan, and each house built from it has its own furniture.
Programs often deal with real-world things such as users, products, and orders. Each of these has characteristics, called properties, and actions it can perform, called methods
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%