Finding Errors in Property Access

Report a typo

Consider the following JavaScript code:

let user;
let book = { title: '1984' };

console.log(user.account);
console.log(book.author);

user = null;
user.account = 'new account';

What will be logged in the console after running this code and what error would it cause?

Select one option from the list
___

Create a free account to access the full topic