nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 10 months agoI wishi.imgur.comimagemessage-square189fedilinkarrow-up1928arrow-down118
arrow-up1910arrow-down1imageI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 10 months agomessage-square189fedilink
minus-squarerobotica@lemmy.worldlinkfedilinkarrow-up13·edit-210 months agoDon’t forget that you can have fall-through cases, so you can simplify it even further: switch (number) { case 1: case 3: case 5: case 7: case 9: ...
Don’t forget that you can have fall-through cases, so you can simplify it even further:
switch (number) { case 1: case 3: case 5: case 7: case 9: ...
Teach me