This there a way to pass a arbitrary value to "this" in the foo function below;
function foo(a){
var getThis = this;
var getA = a;
console.log("getThis:"+getThis);
console.log("\n"+a);
}
foo(5);
Expected output:
getThis: some value that I can pass
5
Answere to the question:
foo.call('some value that I can pass', 5);
thanks