js how to know variable name 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"