!= vs ==

Matt1250
New Member
1 0 0

I was watching a tutorial and this was the code used

{% unless section.settings.hide_soldout != false and product.available != true %}

 

Which is confusing at first because of the Bashes. Why not write it like this

{% unless section.settings.hide_soldout == true and product.available == false %}

Is it because section.settings.hide_soldout's default is false and product.available is true?

Just wondering if there is a valid reason for one over the other.

0 Likes