js checking if something is function with typeof code example Example: check if function javascript variableToCheck instanceof Function