I was reviewing some alternative solutions in a codewars kata and came across this line in the 'top' solution:
result.push(...algo(numbers[i]));
What is the purpose of the '...' in this context? I haven't seen this before and can't find any reference to it anywhere.
Is this a new feature in ES6?
If you need more context it was the 'Split all even numbers to odd ones in different ways' kata, and was the solution by the user 'ph0en1x'.
Don't want to post the whole code here for fear of spoiling the challenge for any other potential users.
Thanks if anyone is able to help clarify!