Exam4Training

What are the values of objBook and newObjBook respectively?

Refer to code below:

Const objBook = {

Title: ‘Javascript’,

};

Object.preventExtensions(objBook);

Const newObjBook = objBook;

newObjectBook.author = ‘Robert’;

What are the values of objBook and newObjBook respectively?
A . [title: “javaScript”] [title: “javaScript”]
B . {author: “Robert”, title: “javaScript}
Undefined
C . {author: “Robert”, title: “javaScript}
{author: “Robert”, title: “javaScript}
D . {author: “Robert”}
{author: “Robert”, title: “javaScript}

Answer: A

Exit mobile version