4 ms·
?? catches any falsy value, so it is quite semantically different than default arguments, and also quite different from ||
by nawgz 6y ago
?? catches any falsy value, so it is quite semantically different than default arguments, and also quite different from ||
- Dylan16807 6y agoDid you write that backwards? || checks for falsy, ?? checks for null/undefined