Basic Concept In TypeScript Day 10

Lecture 10 : Basic Concept In TypeScript Constructor : A constructor is a special method which will be called whenever we create new objects. And generally used of initializing the class members. The constructor method is always defined with "constructor" keyword. The members of the class in a constructor are accessed using "this" keyword. Syntax : constructor (){ //statements } Example : Program- Output- Inheritance : In TypeScript, we can use common object-oriented patterns. One of the most fundamental patterns in class-based programming is being able to extend existing classes to create new ones using inheritance. Types of Inheritance : We can class...