Friday , September 20 2024

We declare an object called dog, with two fields: age and name: let dog = { age: 5. name: “Axel” }; To change the value of the age field to 6, we need to perform:

Questions BankCategory: JavaScript Essentials 1We declare an object called dog, with two fields: age and name: let dog = { age: 5. name: “Axel” }; To change the value of the age field to 6, we need to perform:
We declare an object called dog, with two fields: age and name:

let dog = {
    age: 5.
    name: "Axel"
};

To change the value of the age field to 6, we need to perform:

  • age of dog = 6;
  • dog{age} = 6;
  • dog.age = 6;
  • dog[age] = 6;

More Questions: JavaScript Essentials 1 – JSE1: Module 2 Test