Atom

Spreading

Spreading inserts items from an existing collection into a new collection or a call. Use it when you want to keep the original and assemble a different set of items.

Extend an array without mutating it

Use three dots to insert the starting scores.

Atom
starting = [8, 12]
updated = [...starting, 15]
print(count(starting))
print(count(updated))
Output
2
3

The new array has three items. The original still has two.