Tell us what’s happening:
Describe your issue in detail here.
while doing this challenge, i found that spread operator will help you to remove one array
Your code so far
let arr = [1,2,3,4,5];
console.log(...arr); // 1 , 2 ,3, 4 , 5 *the array[] symbol gone
console.log(arr); // [1,2,3,4,5]
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Yep, this is exactly the function of spread syntax. It takes an iterable (such as an array) and converts it into a “list”. In your example above, it takes the items out of an array and passes them in as separate arguments to console.log. So instead of having to call console.log as: