sundray@lemmus.org to Comic Strips@lemmy.worldEnglish · edit-211 months agoI AM MISTER SANTAlemmus.orgimagemessage-square18fedilinkarrow-up1576arrow-down19file-text
arrow-up1567arrow-down1imageI AM MISTER SANTAlemmus.orgsundray@lemmus.org to Comic Strips@lemmy.worldEnglish · edit-211 months agomessage-square18fedilinkfile-text
minus-squareRentlar@lemmy.calinkfedilinkarrow-up39·edit-211 months agoMr Santa checks if you are naughty || nice to see if you are eligible for a present. Ho ho ho. Everyone is eligible for a present.
minus-squareactiv8r@sh.itjust.workslinkfedilinkarrow-up6·11 months agoNo no no. You’re checking two booleans there. People who are naughty, nice, or both get a present. People who are neither naughty or nice get nothing.
minus-squareHappyFrog@lemmy.blahaj.zonelinkfedilinkarrow-up3·11 months agoWon’t that always come out as true?
minus-squareRentlar@lemmy.calinkfedilinkarrow-up6·11 months agoThat’s correct, hence everyone is eligible.
Mr Santa checks if you are
naughty || nice
to see if you are eligible for a present.
Ho ho ho. Everyone is eligible for a present.
No no no. You’re checking two booleans there. People who are naughty, nice, or both get a present. People who are neither naughty or nice get nothing.
((nice)? ‘present’ : ‘coal’);
Won’t that always come out as true?
That’s correct, hence everyone is eligible.
What if you’re neutral?
Mr Santa crashes…