StackOverflow - StackOverflow

Is the switch example usage in airbnb javascript guide inconsistent?

There is no inconsistency. The curly braces are used as a scope for the lexical declarations. Case 4 is the only case without any such declaration.

Was this helpful?

Have a different question?

Can't find the answer you're looking for? Submit your own question to our community.

🛎️ Get Weekly OTA Fixes

New answers, vendor issues, and updates — straight to your inbox.