join

join

> Functions

Merges several elements into a string, separating them with a delimiter glue.

Parameters
Return
TypeScript

In JavaScript, a.join(separator) converts every element like join in LeekScript, with one exception: null and undefined become the empty string instead of "null". [1, null, undefined, 2].join(",") is therefore "1,,,2".

Python

In Python it is the separator that carries the method: separator.join(a). And it requires all the elements to be strings already — ",".join([1, 2]) raises a TypeError, where join in LeekScript converts every element. Convert them yourself: ",".join(str(x) for x in a).