The first one calls it with no arguments. The second one calls it with arguments of the current function.
this.subject = {
hello: function() {
console.log("Hello called with arguments " + JSON.stringify(arguments));
}
};
function callHello() {
console.log("this.subject.hello();");
this.subject.hello();
console.log("this.subject.hello.apply(this.subject, arguments);");
this.subject.hello.apply(this.subject, arguments);
}
callHello(1, 2);
// => this.subject.hello();
// Hello called with arguments {}
// this.subject.hello.apply(this.subject, arguments);
// Hello called with arguments {"0":1,"1":2}