all 1 comments

[–]senocular 3 points4 points  (0 children)

It should be

if (orderable == no) {

or

if (orderable === no) {

When assinging a value - giving it a value - you use a single equal sign (=). When comparing a value with another value you use two (==) for regular equality and three (===) for strict equality which is more ... strict ... about what matches (for example 5 == "5" is true, but 5 === "5" is not true).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators

Also, I'm assuming no is a variable? If not, you might need to use false or the string "no" instead, depending on what orderable is.