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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay