Assignments, logic or not?
Who doesn’t love shorthands? Well, at least the ones that are easy to understand. Logical assignment operators are quite nice, don’t you think? Do you use this one?
x ??= 8;
It’s actually equivalent to:
if (x === null || x === undefined) {
x = 8;
}
Much shorter and sweeter, right!?