1.

What Is Typeof Operator?

Answer»

The typeof operator is USED to FIND the type of variables.
The EXAMPLE as GIVEN below.
typeof "Anil Singh" // RETURNS string
typeof 3.33 // Returns number
typeof true // Returns Boolean
typeof { name: 'Anil', age: 30 } // Returns object
typeof [10, 20, 30, 40] // Returns object

The typeof operator is used to find the type of variables.
The example as given below.
typeof "Anil Singh" // Returns string
typeof 3.33 // Returns number
typeof true // Returns Boolean
typeof { name: 'Anil', age: 30 } // Returns object
typeof [10, 20, 30, 40] // Returns object



Discussion

No Comment Found