8 ways to use the Spread operator

JavaScript Jeep recently shared an article on ways to use the Spred operator.

Spread operator expands an iterable object (i.e. an Array) into its individual element. An iterable object is anything that you can loop over.

let fruits = ['🍈', '🍉', '🍋', '🍌'];

console.log(...fruits); //🍈 🍉 🍋 🍌

Check out the full article for more ways to use the Spread operator

That's me!

I’m Ajay Karwal. I write about my experiences as a front-end developer. If you enjoy my content, please consider supporting what I do.

Become a PatronBuy me a coffee