we are taking advantage of the fact that the result of modulus 2 operation is always either 1 (for odd) or 0(for even)
Coding Tip: Try to Code Without If-statements
Samer Buna
8.6K13

I think the fact that you are taking advantage of something which is not straight-forward designed to be used in this situation makes it less readable as opposed to the simple if statement. I see your point, but this is probably not the best example of it being done.

Good read though. Thank you :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.