DEV Community

Avinashd
Avinashd

Posted on

Js in bits - 8.4(basic operators)

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.

Order of Precedence

It matters and why?

Image description

Unary + converts strings ----> numbers

Image description

But you might ask why the binary plus not executed first, why unary got executed first?

Answer: Highest Precedence

Image description

1 more example to clear out the confusion

Image description

Leave y'r thoughts....

Top comments (0)