-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (73 loc) · 2.7 KB
/
index.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Math expressions</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<div class="blue"></div>
<div class="heading">
<h1 class="head">Math expressions</h1>
</div>
<div class="blue-buttom">
<div class="para">
Assinment # 5 <br />
JAVASCRIPT
</div>
</div>
<div class="moiz">
<p class="ali">
<object
data="./chapter5.pdf"
type="application/pdf"
width="100%"
height="500px"
>
<p>
Unable to display PDF file.
<a href="./chapter5.pdf">Download</a>
instead.
</p>
</object>
<!-- Wherever you can use a number, you can use a math expression. For
example, you're familiar with this kind of statement. <br />
var popularNumber = 4; <br />
But you can also write this. <br />
var popularNumber = 2 + 2; <br />
You can also write: <br />
alert(2 + 2); <br />
This displays the messge "4" in an alert box. <br />
When it sees a math expression, JavaScript always does the math and
delivers the result. <br />
Here's a statement that subtracts 24 from 12, assigning -12 to the
variable. <br />
var popularNumber = 12 - 24; <br />
This one assigns the product of 3 times 12, 36, to the variable. <br />
var popularNumber = 3 * 12; <br />
In this one, the number 10 is assigned to a variable. <br />
Then 1 is added to the variable, and the sum, 210, is assigned to a
second variable. As usual, you can mix variables and numbers. <br />
1 var num = 10; <br />
2 var popularNumber = num + 200; <br />
You can also use nothing but variables. <br />
1 var num = 10; <br />
2 var anotherNum = 1; <br />
3 var popularNumber = num + anotherNum; <br />
The arithmetic operators I've been using, +, -, *, and /, are
undoubtedly familiar to you. <br />
This one may not be: <br />
var whatsLeftOver = 10 % 3; <br />
23 % is the modulus operator. <br />
It doesn't give you the result of dividing one number by another. It
gives you the remainder when the division is executed. <br />
If one number divides evenly into another, the modulus operation returns
0. In the following statement, 0 is assigned to the variable. <br />
var whatsLeftOver = 9 % 3; -->
</p>
</div>
<h1>Perfrome:</h1>
<script src="./app.js"></script>
</body>
</html>