Static Functions & Properties In TypeScript Part-10

In our previous post we have overview about access Modifiers in Type Script.Today we will learn about Static Functions & Properties In TypeScript.

Static Function & Properties:

Static functions and properties can only be called by their class reference and cannot be called by an object reference.Sometime we need to void unnecessary created object that time we use Static.

Example:

Lets get code Explain:

Above code There are two static  properties and one static function .When those properties and functions are called then do not need created object. Those are called by Class Name

Like:

Happy Coding 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *