God I wish there was an easier way to do this
2,825
11,138
4,020
69,760
Am I missing something? Can't just use number % 2 == 0 return true else false?
40
7
3
486
Yeah, you're missing the floating point bug. Your code works for trivial cases, but if you're using it on a number that *might* have been from a math operation, or from a number that was cast from a string, then the floating point bug might cause that to return the wrong value.
5
1
24
The function param is int, so with the type cast it does in fact work, no floating decimals
1
guys...

Aug 1, 2020 · 5:05 AM UTC