Standard built-ins
Symbol.isConcatSpreadable
An explicit truthy or falsy property controls whether concat treats a value as spreadable; absent or undefined falls back to the array test.
Formal Syntax & Structure
javascript syntaxjavascript
Symbol.isConcatSpreadableReturn Value
symbol
The predefined protocol key.
Working Example
Example Snippetjavascript
const a=[1,2];a[Symbol.isConcatSpreadable]=false;console.log(JSON.stringify([0].concat(a)));