3 ms·
I agree with the sentiment of the article, though I don't really like the example given. To me, using a switch statement instead of if-else-if is not any cleare
by o_nate 7y ago
I agree with the sentiment of the article, though I don't really like the example given. To me, using a switch statement instead of if-else-if is not any clearer.
- kosievdmerwe 7y agoI think for that particular example it's bad, but it might work better for a more complicated example with many more cases.