DEV Community

Avinashd
Avinashd

Posted on

Js in bits - 5.8(typeof)

Learning js should be fun. It is fun if it's easy.
I tried my best in writing this, to understand it the easy way.

datatypes

typeof

It is an operator to check the type of a value.

Image description

Some other types with typeof

Image description

1 last thing:

Image description

Leave y'r thoughts....

Top comments (2)

Collapse
 
alexmustiere profile image
Alex Mustiere

As you said, typeof is an operator, so you don't need the parenthesis.

Collapse
 
avinashd10 profile image
Avinashd

We may, if we are dealing with math and want to know the type of the result after some calculations, as in above (2*3). More of it in future posts.