Question 17
Question
Answer
Math.max(value1, value2, ..., valueN)const max = Math.max(5, 12, 3, 8); // Returns 12
...arrayName // Inside a function argument, object literal, etc.const numbers = [5, 12, 3, 8]; const max = Math.max(...numbers); // Returns 12
Last updated