Challenge 2 — Solution Task: Given const settings = { theme: "dark", fontSize: 14, notifications: true }, use the spread operator to create a new object updatedSettings with fontSize changed to 16, without modifying the original settings object. Log both objects to confirm settings is unchanged. const settings = { theme: "dark", fontSize: 14, notifications: true }; const updatedSettings = { ...settings, fontSize: 16 }; console.log(settings); console.log(updatedSettings); Expected output: { theme: "dark", fontSize: 14, notifications: true } { theme: "dark", fontSize: 16, notifications: true } Notes: - { ...settings, fontSize: 16 } first copies every property from settings into a brand-new object, then the fontSize: 16 written afterwards overrides the copied value. - Property order matters here: had fontSize: 16 been written BEFORE ...settings, the spread would have overwritten it back to 14 instead. - settings itself is never touched — spread always builds a new object, the same non-mutating behaviour as map/filter on arrays.