get js variable name from value code example
Example: get variable name javascript
const myFirstName = 'John'
Object.keys({myFirstName})[0]
// returns "myFirstName"
const myFirstName = 'John'
Object.keys({myFirstName})[0]
// returns "myFirstName"