How to create an enum in JavaScript
Вставка
- Опубліковано 23 тра 2023
- One simple way to create an enum in JavaScript is with a plain object but used as a frozen object with fixed constants. Notice some cons in this concepts though like misspellings will cause it to be undefined and not throw an error.
► Social Media
/ coder4_life
github.com/another-coder4life
/ coder4.life.code - Наука та технологія