Rest and Spread – Things you can do with just 3 dots in Modern JavaScript!

three dots

In JavaScript, the rest operator (also called the spread operator) allows us to represent an indefinite number of elements as an array. It’s a helpful tool that can make our code more concise and easier to read.Here’s an example of how the rest operator works: In this example, the function addNumbers takes an indefinite number … Read more