TypeScript Array join() - TypeScript

What is TypeScript - Array join()?

join() method joins all the elements of an array into a string.

Syntax

Parameter Details

  • separator − Specifies a string to separate each element of the array. If omitted, the array elements are separated with a comma.

Return Value

Returns a string after joining all the array elements.

Example

On compiling, it will generate the same code in JavaScript.

Its output is as follows −

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

TypeScript Topics