Day 9 : TypeScript
Constructor : Constructor is a special type of method or function which is called at the time of object creation. The constructor method is always defined with "constructor" keyword. The class always having a constructor is not needed or necessary. The members of the class in a constructor are accessed using "this" keyword. Syntax : constructor () { //statements } Example : Access Modifiers : The access modifiers are used for controlling the visibility or availability of its data members. Mainly their are three types of access modifiers : 1) Public : By default, all members or functions of class are public. Public members are accessible anywhere in the program. 2) Private : The private members are accessible only within the class and its chi...