I saw on the documentation that
slice method is used to convert Array-like objects (e.g.
arguments) to a new array by using
Array.prototype.slice.call(arguments) but I’m just curious if it is fine if we can use
apply method. Like
Array.prototype.slice.apply(arguments). Since according to the documentation that
the fundamental difference is that
call()accepts an argument list, while
apply()accepts a single array of arguments.
arguments is not actually an array. I mean which of the two is more conventional?