JavaScript Operators To Improve Your Daily Productivity


  • Spread Operator

Spread Operator

Expands an array into it’s individual elements

const food = ['pizza', 'chips', 'nuggets']
// 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 (
   <Menu ...foods/>

Categories: JavascriptReact