JavaScript Operators To Improve Your Daily Productivity

Posted one year ago

Contents

  • Spread Operator

Spread Operator

Expands an array into it’s individual elements


const food = ['pizza', 'chips', 'nuggets']
console.log(...food)
// returns: pizza chips nuggets

As use case would be with React and passing down the props, you may not necessary want to pass down everything individually so you could do something like


return (
   
)