Case

The case statement is a shorthand for JavaScript’s switch statement and takes the following form:

Case Fall Through

You can use fall through just like in a switch statement in JavaScript.

The difference however is that while fall through happens whenever a break statement is not explicitly included in JavaScript, in Pug it only happens when a block is completely missing.

If you would like to not output anything in a specific case, add an explicit unbuffered break:

Block Expansion

Block expansion may also be used: