Answers for "javascript objects"

5

object inside object javascript

var obj = {
  prop1: 5,
  obj2: {
    prop1: [3, 6, 3],
    prop2: 74,
    prop3: {
      str: "Hello World"
    }
  }
};

console.log(obj.obj2.prop3.str); //output: "Hello World"
Posted by: Guest on May-20-2020
30

javascript object

var	person = {
	first_name : "Marty",
  	last_name : "Mcfly",
	born : 1968,
	died : 1933,
    lovers: ["Jennifer Parker","Baines McFly"]
};
Posted by: Guest on June-27-2019
3

json objects

{ "name":"John", "age":30, "car":null }
Posted by: Guest on January-07-2020
10

js object

let car = {
  		name: "BMW",
  		colour: "black",
  		year: "2020",
  		owner: {
		names = ["Andy" , "Steve" , "Tony" ]
		}
};
Posted by: Guest on February-19-2020
10

objects in javascript

let object = {
  'key1': 'value1',
  'key2': 'value2',
  'keyn': 'valuen',
};
console.log(object);
Posted by: Guest on June-19-2020
0

javascript objects

let computer = {

    CPU: "Intel i9",
    motherboard: "MSI MPG Z490",
    graphicsCard: "NVIDIA 3090",
    powerSupply: "Redragon RGPS GC-PS003",
    getSpecs: function() {

        return "My computer is equipped with a(n) " + this.CPU + ", a(n) " + this.motherboard + " motherboard, a(n) " + this.graphicsCard + " GPU and a(n) " + this.powerSupply + " power supply.";

    }

};

console.log(computer.getSpecs());

// OUTPUT: My computer is equipped with a(n) Intel i9, a(n) MSI MPG Z490 motherboard, a(n) NVIDIA 3090 GPU and a(n) Redragon RGPS GC-PS003 power supply.
Posted by: Guest on July-29-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language