I am confused about using apply or call method correctly.
I know that apply is passing an array to the function and call is passing strings to a function.
For example the code b
The first argument will be the this in your function.
ie:
var p = {"name":"someone"};
function myFunction(a, b) {
console.log(this);
return a*b;
}
var myArray = [10,2];
myFunction.apply(p, myArray); //log output shows {"name":"someone"}