4 ms·
The === operator is used by case statements, and can be used to implement pattern matching if you write objects which match in the way you want. It's how regexe
by barrkel 7y ago
The === operator is used by case statements, and can be used to implement pattern matching if you write objects which match in the way you want. It's how regexes match strings and ranges match numbers, etc.
What it doesn't have is destructuring combined with pattern matching, though it does have some destructuring assignments.