Function join

Joins the elements of an array into a string using a specified separator.

join(', ', [1, 2, 3]); // => '1, 2, 3'
  • Type Parameters

    • S extends string

    Parameters

    • separator: S

    Returns (<T>(list: readonly T[]) => string)

      • <T>(list): string
      • Type Parameters

        • T

        Parameters

        • list: readonly T[]

        Returns string