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

 

 

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK