Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to get enum item name in javascript

enum Enum {
  A,
}
 
let a = Enum.A;
let nameOfA = Enum[a]; // "A"
Comment

PREVIOUS NEXT
Code Example
Javascript :: npm install global vs local 
Javascript :: How to use useState Hook in React/ReactNative 
Javascript :: js copy span text to clipboard 
Javascript :: useeffect hook react 
Javascript :: how to split text into array javascript 
Javascript :: javascript print random word from lsit 
Javascript :: javascript remove property from object 
Javascript :: jquery get meta value 
Javascript :: push characters to a string javascript 
Javascript :: check value exist in array javascript 
Javascript :: import applymiddleware 
Javascript :: function(a, b){return b - a} 
Javascript :: javascript squared 
Javascript :: adding border in react native 
Javascript :: array to excel javascript 
Javascript :: how to create a package.json file in npm 
Javascript :: jquery add remove class timer 
Javascript :: next js getserversideprops 
Javascript :: count a character in a string, js 
Javascript :: how to validate the textbox using jquery 
Javascript :: laravel array to js 
Javascript :: eslint-disable-next-line 
Javascript :: discord.js v13 intents 
Javascript :: how to set background colour i js inline stylel 
Javascript :: nl2br javascript 
Javascript :: getting state in react-router-dom v6 
Javascript :: [Error - 10:52:45 PM] Failed to load jshint library 
Javascript :: access variable outside for loop javascript 
Javascript :: yyyy-mm-dd to dd-mm-yyyy in javascript 
Javascript :: local storage remove multiple items 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =