CommentMay 9, 20163
I didn't know about the wanted '==' typed '=' mistake. You can find the left-constant comparison useful in coffee-script too! Although in different scenario as in coffee-script the compare operation is done with the is keyword. In JS I would write indexOf(item) === 1; naively in CS I might try indexOf item is 1 but the compiled JS is indexOf(item === 1 ); // oops so the correct code is: indexOf(item) is 1 and finally, to avoid the parentheses I settled with the pattern 1 is indexOf item which produces 1 === indexOf(item); Nice to know that it's called Yoda conditions.