Tôi đang đọc cuốn sách Javascript: The Good Parts. Và tôi bối rối bởi đoạn mã sau.Tại sao áp dụng() ở đây chỉ có một đối số thay vì hai đối số?
Function.method('curry', function () {
var slice = Array.prototype.slice,
args = slice.apply(arguments),
that = this;
return function () {
return that.apply(null, args.concat(slice.apply(arguments)));
};
});
Đâu là null
trong slice.apply(arguments)
?