FrontendDeveloper.in

JavaScript question detail

What is typeof operator

You can use the JavaScript typeof operator to find the type of a JavaScript variable. It returns the type of a variable or an expression.

typeof "John Abraham"; // Returns "string"
typeof (1 + 2); // Returns "number"
typeof [1, 2, 3]; // Returns "object" because all arrays are also objects
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399