how to check variable is function or not in javascript code example Example: check if function javascript variableToCheck instanceof Function