check argument is function in js code example Example: check if function javascript variableToCheck instanceof Function