> For the complete documentation index, see [llms.txt](https://hopemoore.gitbook.io/coding-for-creatives/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hopemoore.gitbook.io/coding-for-creatives/glossary/operators/relational-operators.md).

# Relational Operators

Many if statements compare values

Use the operators below to compare values:

|                          | Operator | Example(s)                                                                                               |
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------- |
| is equal to              | ==       | <p>if (name == "Betty") { ... }</p><p>if (x == 0) { ... }</p><p>if x == 1: ...</p>                       |
| is not equal to          | != or <> | <p>if (name != "Alan") { ... }</p><p>if (num != 5) { ... }</p><p>if num != 2: ... or if num <>2: ...</p> |
| lesser than              | <        | <p>if (count < 10) { ... }</p><p>if count < 10: ...</p>                                                  |
| greater than             | >        | <p>if (length > 3.4) { ... }</p><p>if length > 3.4: ...</p>                                              |
| lesser than or equal to  | <=       | <p>if (points <= 100) { ... }</p><p>if points <= 100: ...</p>                                            |
| greater than or equal to | >=       | <p>if (width >= 6.2) { ... }</p><p>if width >= 6.2: ...<br></p>                                          |
