String.concat(string1, string2, ...) Last updated: 30. May 2026

Combines multiple strings into one string. Function may be called with one or a "whole bunch" of strings in as parameters.

Parameters

Name Type Description
string1 string

First string to concat.

string2 string

Second string to concat.

... ...

etc

Returns

The combined string. Does not modify the input strings.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#{
    const str1 = "Hello";
    const str2 = "World";
    
    write(str1.concat(" ", str2));
    // Expected output: "Hello World"
}#

Output

The #JS code above produces the output shown below:
Hello World