Closed oleedd closed 2 months ago
if
is normal expression space, so adding that ability would need to be its own distinct proposal.
If we're able to add the is
operator, though, then you could do if (val is >= 10 and < 20)
.
Where is the proposal with the is
operator?
this one. it's the third bullet point in https://github.com/tc39/proposal-pattern-matching?tab=readme-ov-file#specification - but it's not yet clear if we'll be able to keep it or not.