Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Oktokolo74524dreturn (john || doe || max || paul || stella ? "" : "Not ") + "Okay";
But that is only playing code golf.
Normally, you want code to be readable instead of just being short.
AlmondSauce845424dMy only 2p is that it's a stupid interview question. I wouldn't want to work anywhere that relied on micro-optimisation knowledge and code golfing over code readability.
Agreed with golf vs readability, though.
Lor-inc436524dA == B == C == D doesn't mean that they're the same. It means that
A == B && C == D || A != B && C != D
wiwe221053522dThis is the kind of questions that make me annoyed because it doesn't have anything to do with writing quality code.