Inside a JavaScript switch instruction, different case(s) may contain much code. Therefore it could be useful to collapse (fold) the code for cases other than the one I am working on.
I use Netbeans. How do I do that?
Previously unknown to me, but very handy!
Put braces around the code that is inside the case: Netbeans will display the fold/unfold symbol then you can proceed as usual.
switch (kNumCell)
{
case "0":
{
// code comes here
}
break;
// …
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With