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.
There isn't a specific operator that isn't the ternary operator, but you can use it like this:
max = (max < b) ? b : max;