6.2 The OR Operator

Logical OR operators work the same way as AND operators, except only one of the references need evaluate to true in order for the entire expression to be considered true. Consider the following example:

## logical OR

#if( $foo || $bar )
  <strong>This OR That</strong>

If $foo is true, the Velocity Templating Engine has no need to look at $bar; whether $bar is true or false, the expression will be true, and This OR That will be output. If $foo is false, however, $bar must be checked. In this case, if $bar is also false, the expression evaluates to false and there is no output. On the other hand, if $bar is true, then the entire expression is true, and the output is This OR That