I want to find a way to combine multiple if statements all to one line with some clever spacing.
var myBool = myObject.prop1 ||
myObject.prop2 &&
myObject.prop3.someproperty
Since prop3 might be empty so I want to check if "someproperty" exist in prop3.
But I do not want to add another if statement like
typeof myObject.prop3.someproperty === 'undefined
before my myBool.
Is there anyway that I can make everything in one line with clever spacing?