Answers for "get object name javascript"

0

get object name javascript

var a = {
    name:'a',
    'light': 'good',
    'dark' : {
         name: 'dark',
        'black': 'bad',
        'gray' : 'not so bad'
    }
}

// This way you can do

console.log(a.name,a.dark.name);
Posted by: Guest on October-13-2020

Code answers related to "get object name javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language