Section: Basics and Syntax

Object spread merge

javascript
javascript
const merged = { ...defaults, ...overrides };

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Basics and Syntax
Optional chaining
OpenIn sheetjavascriptsame section
Object destructuring
OpenIn sheetjavascriptsame section
Log a value
Print a value to the console.
OpenIn sheetjavascriptsame section