Function
Check if the variable is of the chosen type
The variable to check
The type you want
True if the value is of the chosen type, false otherwise
isType("hello", "string"); // trueisType(42, "number"); // trueisType([], "object"); // trueisType("42", "number"); // false Copy
isType("hello", "string"); // trueisType(42, "number"); // trueisType([], "object"); // trueisType("42", "number"); // false
Check if the variable is of the chosen type