JavaScript: Math.max & Math.min