Standard built-ins

Symbol.isConcatSpreadable

Try the free JavaScript compiler

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.isConcatSpreadable

Return 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)));
JavaScript Reference