Skip to content

JSArray.Join

boxgaming edited this page Jul 25, 2026 · 2 revisions

Returns a new string by concatenating all of the elements the specified array, separated by commas or a specified separator string.

Syntax

result = JSArray.Join ( a [, separator$] )

Parameters

  • The a parameter contains the native Javascript array on which the operation will be performed.
  • The optional separator$ parameter specifies the string which should be used to separate the elements in the generated string. If not specified, the array elments will be separated with a comma "," character.

Example

Import JSArray From "lib/lang/array.bas"

Dim numArray As Object
numArray = JSArray.Create(1, 2, 3, 4)

Print JSArray.Join(numArray)
Print JSArray.Join(numArray, " | ")

Output

1,2,3,4
1 | 2 | 3 | 4

See Also

JSArray.Create
Javascript - Array.join()

Clone this wiki locally