It called spread operator. But in this sample code I think we don't need to do this. since your compare function only need two parameters (Assume this is real code).
It's a new Es6 functionality called the spread operator, it's great for calling functions (without apply), converting arguments or NodeList to Arrays, array manipulations, and even when using the Math functions.
comparefunction only need two parameters (Assume this is real code).