TypeScript String split()
Syntax & Examples


Syntax of String.split()

The syntax of String.split() method is:

split(separator: string | RegExp, limit?: number): string[]

This split() method of String split a string into substrings using the specified separator and return them as an array.