Junior JavaScript

What is the typeof operator?

Used to find the type of a variable.

typeof "Hello"; // "string"

typeof 10; // "number"

typeof null; // "object" (bug)

More from JavaScript Tutorial

All questions for this course