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

That is how it evaluates, not what the original author intended in the example in the OP.

    return a === b ?? c;
The intent was

    const bOrDefault = b ?? c;
    return a === bOrDefault;
You posted the actual (buggy) evaluation. I agree that its better if that is what you intend.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: