Using Math.max() instead of (a = a<x ? x : a)