124
rated 0 times
[
126]
[
2]
/ answers: 1 / hits: 121799
/ 11 Years ago, thu, february 21, 2013, 12:00:00
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?
More From » ternary-operator