Both WordPress and Statamic content management systems are built on PHP. Just like many other programming languages, PHP's syntax for OR is two vertical lines; PHP's syntax for AND is two ampersands &&. Alternatively, the words "and" and "or" may be used, too. Here are some code examples.
Especially for web designers new to Statamic, it can take some time to figure out how to manipulate Statamic-specific variables and incorporate the correct logic syntax to do what you want. Here are a few useful if statements that might help you out!
Explore coding solutions for displaying the first word in a form field or variable by using PHP explode or a Regex Replace alternative in your Statamic CMS websites.
If you're looking for how to use "x-if" and "x-if not" syntax in Alpine.js, then here's the post for you.
If you're new to Ruby programming, understanding conditionals is an important first step.
Indenting Ruby code is the best practice. Learn about Ruby formatting plugins and the community-driven Ruby Style Guide.