Standard built-ins
Symbol.split
Key for a split hook, called with the source string and optional limit.
Formal Syntax & Structure
javascript syntaxjavascript
Symbol.splitReturn Value
symbol
The predefined protocol key.
Working Example
Example Snippetjavascript
const x={[Symbol.split](s){return [s.toUpperCase()];}};console.log(JSON.stringify("ab".split(x)));