Skip to content

add()

The add method adds a single item to the collection.

js
collect([1, 2, 3, 4]).add(5);

// [1, 2, 3, 4, 5]

View source on GitHub

Released under the MIT License.