.concat(val)

Description

Concat allows you to join two arrays or two strings together. It functions identically to the ++ operator.

Parameters

Concat takes only one parameter, and will treat multiple parameters as one parameter

Usage On Arrays

log ["hello"].concat(["world"])
// ["hello","world"]

log ["hello"] ++ ["world"]
// ["hello","world"]

Usage On Strings

log "hello".concat("world")
// "helloworld"

log "hello" ++ "world"
// "helloworld"

Last updated