Can I use a ternary operator when I have more than one operation to perform per case?
For example can I use it here?:
if (dwelling) { dwellin
To avoid the side effects using the comma-notation you could use self-invoking functions instead which can handle your code:
(foo == bar) ? doSomething() : (function(){ // here you can write all your code // and even return something useful })();