Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Find the Maximum and Minimum Values in an Array</title> </head> <body> <script> let numbers = [1, 3, 2]; document.write(Math.max.apply(null, numbers) + "<br>"); // Prints: 3 document.write(Math.min.apply(null, numbers)); // Prints: 1 </script> </body> </html>