How to assign only if condition is true in ternary operator in JavaScript
Is it possible to do something like this in JavaScript?
max = (max < b) ? b;
In other words, assign value only if the condition is true. If the condition is false, do nothing (no assignment). Is this possible?
Add comment