Stop Making This Coding Mistake | Bad Boolean Zen

preview_player
Показать описание
This is one of the most common coding mistakes. Stop doing this!

Prepping for your frontend interviews? Use code "conner" for a discount on my course FrontendExpert:

Рекомендации по теме
Комментарии
Автор

but still it doesn't make the initial code wrong, I don't get why do you say that it's a mistake in the first place

x-raychannel
Автор

const isEven = number => !(number % 2)

attilagyen
Автор

not quite sure about the real benefits of doing that kind of syntactic sugar when coding stuff that will be read by other people. At the end JS is going to compute the whole division+comparison anyway although you did not add all those extra lines.

socialsmr
visit shbcf.ru