• Post author:
  • Post category:Blog
  • Reading time:2 mins read
  • Post last modified:June 12, 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:

  • dog{age} = 6;
  • age of dog = 6;
  • dog.age = 6;
  • dog[age] = 6;
Answers Explanation & Hints:

To change the value of the age field to 6 in the given object, you would use the syntax:

dog.age = 6;

This will update the age field of the dog object to 6.

For more Questions and Answers:

JavaScipt Essentials 1 (JSE) | JSE1 – Module 2 Test Exam Answers Full 100%

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments