-
Notifications
You must be signed in to change notification settings - Fork 1
/
Math Function in JavaScript.html
29 lines (25 loc) · 1.18 KB
/
Math Function in JavaScript.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<head>
<title>Math Functions in JavaScript</title>
</head>
<body>
<script>
document.write("Eumar value=" + Math.E + "<br>");
document.write("abosulet value=" + Math.abs(35) + "<br>");
document.write("abosulet value=" + Math.abs(-75) + "<br>");
document.write("ceil value=" + Math.ceil(-3.4) + "<br>");
document.write("ceil value=" + Math.ceil(45.56) + "<br>");
document.write("floor value=" + Math.floor(12.45) + "<br>");
document.write("floor value=" + Math.floor(-12.98) + "<br>");
document.write("round value=" + Math.round(25.65) + "<br>");
document.write("round value=" + Math.round(25.45) + "<br>");
document.write("exponantial value=" + Math.exp(2) + "<br>");
document.write("maximum value=" + Math.max(10, 36, 45, 12, 1, 89, 100) + "<br>");
document.write("minimum value=" + Math.min(10, 36, 45, 12, 1, 89, 100) + "<br>");
document.write("power value=" + Math.pow(2, 3) + "<br>");
document.write("power value=" + Math.pow(3, 4) + "<br>");
document.write("square root value=" + Math.sqrt(121) + "<br>");
document.write("random value=" + Math.random() + "<br>");
</script>
</body>
</html>