Another short one. Although Statamic has a great documentation, sometimes I struggle finding basics things like this. So here we go, hope this helps others.
Copied!
{{ if environment == "production" }} // ... Your code{{ /if }}
Syntax highlighting provided by torchlight.dev.