math.max math.min javascript code example Example: math js min var x = 10, y = -20; var z = Math.min(x, y); //z = y