In JavaScript, we can use the typeof operator to check the type of a variable or object. The typeof operator takes a variable and returns its type in a string format. In addition, to the typeof operator, JavaScript also provides the instanceof operator to check the type of a variable or object.