How to add a static member property in a JavaScript class?

added by DotNetKicks
12/20/2018 12:59:52 PM

1 Kicks, 372 Views

Recently while solving a problem, I came across a requirement to create a property in a JavaScript class, which needs to be shared by all the object instances. In the programming world, these types of properties are called Static Properties. There are various scenarios when you need a static member property: When counting number of...