An immutable object update creates a new object and places changed properties after the original spread so they override old values.
const original = { theme: "light", compact: false };
const updated = { ...original, theme: "dark" };The starter mutates settings, so both variables end up with a dark theme. Replace the two update lines with one immutable spread update. The output must show Original: light and Updated: dark.