8.
How to find the maximum value between two variables, num1 and num2, using the Math.max() function in JavaScript?
Math.max(num1, num2, num3)
max(num1, num2, num3)
Math.max(num1, num2)
max(num1, num2)
Correct: C
To find the maximum value between two variables, num1 and num2, in JavaScript, you can use the Math.max() function. This function takes one or more arguments and returns the largest value. In this case, the correct usage would be Math.max(num1, num2).
const num1 = 5;
const num2 = 10;
const max = Math.max(num1, num2);
console.log(max); // Output: 10