i love them "?". so many times my code didn't work as expected when i used || and a valid value was 0 or an empty string. then i learned about ?? and changed a lot of "if (v !== undefined) v = def" to v ??= def.
JS indeed has an elegant solution for every problem.
i love them "?". so many times my code didn't work as expected when i used || and a valid value was 0 or an empty string. then i learned about ?? and changed a lot of "if (v !== undefined) v = def" to v ??= def.
JS indeed has an elegant solution for every problem.
This is so similar to C#