Repository navigation
Expand file tree
/
Copy pathP7.html
More file actions
36 lines (34 loc) · 1.67 KB
/
Copy pathP7.html
File metadata and controls
36 lines (34 loc) · 1.67 KB
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
30
31
32
33
34
35
36
<html>
<head>
<title>Program7</title>
</head>
<body>
<script>
document.write(" <h2>Math Properties</h2>");
document.writeln("<br>Math.E : " + Math.E);
document.writeln("<br>Math.PI : " + Math.PI);
document.writeln("<br>Math.SQRT2 : " + Math.SQRT2);
document.writeln("<br>Math.SQRT1_2 : " + Math.SQRT1_2);
document.writeln("<br>Math.LN2 : " + Math.LN2);
document.writeln("<br>Math.LN10 : " + Math.LN10);
document.writeln("<br>Math.LOG2E : " + Math.LOG2E);
document.writeln("<br>Math.LOG10E : " + Math.LOG10E);
document.write(" <h2>Math Objects</h2>");
let n=7.52;
document.write(" <b>Number : 7.52 </b><br><br> ");
document.writeln(" Integer part : "+Math.trunc(n));
document.writeln(" <br>Nearest Integer : "+Math.round(n));
document.writeln(" <br>Square root : "+Math.sqrt(n));
document.writeln(" <br>Minimum value from (4, 3, 7, -1) : "+Math.min(4, 3, 7, -1));
document.writeln(" <br>Maximum value from (4, 3, 7, -1) : "+Math.max(4, 3, 7, -1));
document.write(" <h2>String Methods</h2>");
let str = "Muhammed Mubarak";
document.write(" <b>String : Muhammed Mubarak </b><br><br> ");
document.writeln("Length of String : "+ str.length);
document.writeln("<br>String in Upper case : "+str.toUpperCase());
document.writeln("<br>String in Lower case : "+str.toLowerCase());
document.writeln("<br>Join a String : "+str.concat(" ","A P"));
document.writeln("<br>Replace Muhammed in String : "+str.replace("Muhammed","Naham"));
</script>
</body>
</html>