Javascript - Function Function call()


The call() method first argument is the this value, but the remaining arguments are passed directly into the function.

Using call() arguments must be enumerated specifically:

function sum(num1, num2){
    return num1 + num2;

function callSum(num1, num2){
    return, num1, num2);

console.log(callSum(10,10));   //20

Using the call() method, callSum() must pass in each of its arguments explicitly.