JS Math 프로퍼티 (Math.PI)
2021. 7. 30. 22:24
728x90
01 Math.PI() 프로퍼티
PI 값(π ≈ 3.141592653589793)을 반환한다.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>math 메소드</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<script>
var pi = Math.PI;
document.write(`pi = ${pi}`);
</script>
</head>
<body>
</body>
</html>
728x90
'JavaScript > Study' 카테고리의 다른 글
[JS] String 메소드 (str.charAt, str.substring, str.indexOf, str.replace, str.replaceAll) (0) | 2021.07.30 |
---|---|
JS String 객체/프로퍼티 ("", '', .length,) (0) | 2021.07.30 |
JS Math 메소드 (Math.max, Math.min, Math.random, Math.round, Math.floor, Math.ceil, Math.trunc) (0) | 2021.07.25 |
[JS] Date 메소드 (Date.now, Date.prototype getter, Date.prototype setter) (0) | 2021.07.24 |
[JS] Date 객체 (new Date) (0) | 2021.07.20 |