# Conditional logic

* `{{#if }  {{else}}  {{/if }}` - this checks for the existence of something (this does not check equality)
* `{{#unless}}  {{else}}  {{/unless}}` - this checks for the non-existence of something (this does not check non-equality)
* `{{#equal}}  {{else}}  {{/equal}}` - this checks equality, i.e. if something equals something

Example 1:

```handlebars
{{#if (Request.QueryParam.price) }}
	A price of {{ Request.QueryParam.price }} was provided

	{{#equal Request.QueryParam.price "10"}}
    		Price is 10!
	{{else}}
		Price is something other than 10.
  	{{/equal}}
{{else}}
	No price was provided
{{/if}}
```

Example 2:

```handlebars
{{#unless Request.QueryParam.product}}
	No product was provided
{{else}}
	A product named "{{Request.QueryParam.product}}" was provided
{{/unless}}
```

Follow a tutorial [here](https://docs.cloud.hoverfly.io/tutorials/response-templating/tut4#part-3.-conditional-statements) to learn more about conditionals and equality
