nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 8 months agoI wishi.imgur.comimagemessage-square181fedilinkarrow-up1908arrow-down117
arrow-up1891arrow-down1imageI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 8 months agomessage-square181fedilink
minus-squarerobotica@lemmy.worldlinkfedilinkarrow-up13·edit-28 months agoDon’t forget that you can have fall-through cases, so you can simplify it even further: switch (number) { case 1: case 2: case 3: case 4: case 5: ...
Don’t forget that you can have fall-through cases, so you can simplify it even further:
switch (number) { case 1: case 2: case 3: case 4: case 5: ...
Teach me