Firefox 79 was released on 28th July, 2020. Major web platform updates in this version include :
Javascript logical assignment operators are enabled. These include logical OR assignment operator, logical AND assignment operator and logical nullish assignment operator.
These operators can be used to perform assignment based on criteria, basesd on whether the left hand side is a falsy, truthy, or nullish value.
// set x to y when x is falsy
x ||= y;
// set x to y when x is not falsy
x &&= y;
// set x to y when x is nullish
x ??= y;
Read the full Mozilla blog post.
Comments