Apply method confusion

is doing a question on Niuke.com. I encounter a problem:
to achieve the function callIt, after the call meets the following conditions
1, the returned result is the result after calling fn
2, and the call parameter of fn is all the parameters after the first parameter of callIt.
some people solve it in this way: (the first method can understand, why is the second method written in this way? Didn"t shift return the first element that was deleted? why is the apply method just called, and there is no sign of how fn is called? I don"t quite understand)
clipboard.png

Feb.26,2021

that's [] .shift.call (a)

that is, a.shift () , mainly arguments is not an array type, so you need to use call to change this of [] .shift () to arguments , so that argumengs can use the shift method.

< hr >
function callIt(){
 var fn = [].shift.call(arguments)
 var newArguments = arguments
 return fn.apply(null, newArguments)
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bce411-38fa0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bce411-38fa0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?