Haha, I knew that! Yes I though about adding the Object.freeze, but I didn't know whether you wanted to go this far or not. But it's great that you added a fully capable example.
Great article. Keep up the good work!
We're a place where coders share, stay up-to-date and grow their careers.
Hi there.
You said in your first example that this was how to make an enumeration in JavaScript:
I believe the right example was:
The equal sign is not a valid operator for assigning value to a property inside of an object in JavaScript.
Yes, you are right. That is what you get, after using TS too much :).
I would even go as far to tell the best way would be something like this:
Thanks.
Haha, I knew that! Yes I though about adding the Object.freeze, but I didn't know whether you wanted to go this far or not. But it's great that you added a fully capable example.
Great article. Keep up the good work!