News for hackers. Stuff that matters.
Re:Interesting Bugs Caught by ESLint's no-constant-binary-ex... by pests on Wednesday November 08, 2023 @11:45PM (#38201280)
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.

There are no comments on this comment yet.