I am conducting a test to determine in which function this callback function is executed. The expected result should be a boolean value. I trust that you understand my objective.
Below is an example of the code:
function test(par, callback) {
// ...
if (typeof callback == 'function') {
callback.call(this);
}
}
test("par", function() {
console.log("Test to see if in function test: " + "<if this is in function test>");
});
Does this bear any resemblance to instanceof?