Answers for "javascript object get outher"

2

js create object with properties

function Car(make, model, year) {
  this.make = make;
  this.model = model;
  this.year = year;
}
Posted by: Guest on April-01-2020
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 "Javascript"

Browse Popular Code Answers by Language