The Math.max(x,y) method can be used to find the highest value of x and y:

Example

Math.max(5, 10);



Practice Excercise Practice now