Return to site

JS: Spread operator

· react,fullstack

The ... operator is the spread operator.

It is used to plit up array elements OR object properties

const newArray = [...oldArray,1,2]

const newObject = {...oldObject, newProp:5}

#angular #tip #javascript #spread