• 코드:
​x
 
1
<!DOCTYPE html>
2
<html lang="ko">
3
​
4
<head>
5
    <meta charset="UTF-8">
6
    <title>JavaScript Math Method</title>
7
</head>
8
​
9
<body>
10
​
11
    <h1>Math.sin() 메소드</h1>
12
​
13
    <script>
14
        document.write(Math.sin(0) + "<br>");   // 0
15
        document.write(Math.sin(Math.PI / 2));  // 1
16
    </script>
17
    
18
</body>
19
​
20
</html>