Skip to content
Jobless Busters
JavaScriptQuestion 34 of 36Multiple choice

Spread and a nested object

What does the last line print?

JavaScript
const original = { profile: { name: 'Anna' } };
const shallow = { ...original };
shallow.profile.name = 'Ola';
console.log(original.profile.name);

Choose one answer.

Source: Quiz question based on a card · Full Stack / JS

The answer and explanation come from the source card linked below.