DEV Community


Discussion on: How to approach solving a challenge during a coding interview

anuraghazra profile image
Anurag Hazra

We could do (!(i % 15)) right?

adyngom profile image
Ady Ngom Author

yup you could as well always try to read out your conditionals in plain English to make sense of out them. So if I was to replace i with 10 or 15 using your construct I would be saying
is (10%15) falsy? is (6) falsy? No
is (15%15) falsy? is (0) falsy? Yes