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
Please login or Register to submit your answer