loverajoel / jstips

This is about useful JS tips!

Home Page:http://jstips.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#35 anti-example?

ffigiel opened this issue · comments

Tip says

Instead of using:

a = true;
b = false;

We can use:

a |= 1;
b &= 0;

Why go the long way? This is not cleaner OR simpler.

I agree with you, and I remove it, thanks for your advice!