Friday, June 22, 2018

JavaScript: Enumerations





Fond of enumeration and missing it  in your client side programming with your favorite language like JavaScript, don't panic, it is here for you

A sample code for a status enumeration

var enStatus = {"All":-1, "InActive":0, "Active":1};
Object.freeze(enStatus); 
 
That's it :)

No comments:

Post a Comment