▲ 427 ▼ Infallible Code (feddit.uk) submitted 1 year ago by sirico@feddit.uk to c/programmerhumor@lemmy.ml 122 comments fedilink hide all child comments
[–] olafurp@lemmy.world 13 points 1 year ago* (1 child) I'll join in const isEven = (n) => !["1","3","5","7","9"] .includes(Math.round(n).toString().slice(-1)) permalink fedilink source hideshow 1 child comment replies: [–] Two9A@lemmy.world 4 points 1 year 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. permalink fedilink source parent
[–] Two9A@lemmy.world 4 points 1 year 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. permalink fedilink source parent