What does this program print after the rest object is changed?

from Destructuring assignment
Node 24 intermediate 2 min

What does this program print after the rest object is changed?

JavaScript
const source = {
  secret: undefined,
  settings: { theme: 'dark' },
};

const { secret = 'none', ...copy } = source;
copy.settings.theme = 'light';

console.log(secret, source.settings.theme);
Open in playground
Report an error