Converting C# Enums to JavaScript

In one of my projects, I needed some enums defined in C# to also be usable in my JavaScript code. After some quick research on the internet, I came up with a simple and easy extension method to convert C# enums to JavaScript. Here it is.

Let’s get started with an example enum and suppose we want to be able to also use it with JavaScript.

Link: https://dzone.com/articles/converting-c-enums-to-javascript?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev