코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Math Method</title> </head> <body> <h1>Math.max() 메소드</h1> <script> document.write(Math.max() + "<br>"); // -Infinity document.write(Math.max(1, 10, -100, -10, 100, 0) + "<br>"); // 100 document.write(Math.max(1, 10, -100, -10, "1000", 0) + "<br>"); // 1000 document.write(Math.max(1, 10, -100, -10, "문자열", 0)); // NaN </script> </body> </html>