Gapur Kassym
Jan 24, 2023

Hey, you didn't understand properly. Your example is correct. But bad practice if you use like:

...

const user1 = 1;

const user2 = 2;

user1 < user2 && someFunction();

...

do this instead:

...

const user1 = 1;

const user2 = 2;

if (user1 < user2) {

someFunction();

}

...

Maybe my example is not good, I will update. Hopefully it is clear. Thanks

Gapur Kassym
Gapur Kassym

Written by Gapur Kassym

Senior Software Engineer at Twilio, Technical Writer #JavaScript #React #React-Native #Nodejs. Follow me on twitter https://twitter.com/GKassym

No responses yet