How do I use the CoffeeScript existential operator to check some object properties for undefined?
I would like to use the CoffeeScript existential operator to check some object properties for undefined. However, I encountered a little problem. Code like this: console.log test if test? Compiles to: if (typeof test !== "undefined" && test !== null) console.log(test); Which is the behavior I would like to see. However, when I try using it against object properties, like this: console.log test.test if test.test? I get something like that: if (test.test != null) console.log(test.test); Which desn't look like a check against undefined at all. The only way I could have achieved the same (1:1)