.concat(val)

Description

Concat is a method that concatenates an array with a value

Parameters

Concat takes the value to concatenate as a parameter.

Usage On Arrays

arr = ["wow"]
// setup the array

log arr.concat(["hello","world"])
// returns ["wow","hello","world"]
// "hello" and "world" were concatenated

Last updated

Was this helpful?