About Lesson
Spread Syntax with Arrays
The spread operator (…) allows you to expand elements from an array into individual elements. This is useful for creating copies of arrays or merging arrays.
Example:
JavaScript
let fruits = ["Apple", "Banana"];
let moreFruits = ["Mango", ...fruits];
console.log(moreFruits); // Output: ["Mango", "Apple", "Banana"]