this post was submitted on 15 Jul 2025
446 points (94.8% liked)

Programmer Humor

37222 readers
250 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] olafurp@lemmy.world 14 points 1 day ago* (last edited 1 day ago) (1 children)

I'll join in

const isEven = (n) 
  => !["1","3","5","7","9"]
    .includes(Math.round(n).toString().slice(-1)) 
[โ€“] Two9A@lemmy.world 4 points 1 day ago

I've actually written exactly that before, when I needed to check the lowest bit in an SQL dialect with no bitwise operators. It was disgusting and awesome.