Hi,
I am reading this article.
http://modernjavascript.blogspot.co....-patterns.html

Now he give the following example:
Code:
// take a callback function and change it to return a promise
Aplus.toPromise = function(fn) {
 return function() {

  // promise to return
  var promise = Aplus();

  //on error we want to reject the promise
  var errorFn = function(data) {
   promise.reject(data);
  };
  // fulfill on success
  var successFn = function(data) {
   promise.fulfill(data);
  };

  // run original function with the error and success functions
  // that will set the promise state when done
  fn.apply(this,
   [errorFn, successFn].concat([].slice.call(arguments, 0)));

  return promise;
 };
};
What I don't understand is in line 20, the line:
Code:
[errorFn, successFn].concat([].slice.call(arguments, 0))
What is the reason to use slice if he any way take all the array.
As far as I understand it, he could write it like this:
Code:
[errorFn, successFn].concat(arguments)

So in short, my question is why the use of slice there if in any case you take all the array?