Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And "X && Y || Z" is usually equivalent to "X ? Y : Z".

So "nullableVariable != null ? nullableVariable.someMethodCall() : fallbackIfNullMethodCall();".



If X is true and Y is false this returns Y instead of Z which is wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: