-
Notifications
You must be signed in to change notification settings - Fork 0
/
tut41.html
44 lines (38 loc) · 1.35 KB
/
tut41.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>js tut</title>
<script>
var a =78;
var b="harry";
c=1.3;
console.log(c)
c=-c;
console.log(c)
c=488+8;
console.log(c)
// operator in JS
// in 2+3 3 and 4 are operands and "+ is operator"
// 1. unary operator(it has single operand)
// 2.binary operator(it has 2 operands)
// operand
// arithmetic operation in JS
var num1 = 5;
var num2 = 5;
console.log("the value of num1 +num2 =" + (num1+num2));
console.log("the value of num1 -num2 =" + (num1-num2));
console.log("the value of num1 *num2 =" + (num1*num2));
console.log("the value of num1 **num2 =" + (num1 ** num2));
console.log("the value of num1 ++ =" + ( num1++ ));
console.log("the value of num1 ++ =" + (++ num1 ));
</script>
</head>
<body>
<div class="container"><h1>this is container</h1></div>
<div class="cont1">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto, omnis dignissimos corrupti nobis veritatis magnam, nesciunt illum mollitia expedita excepturi te?</p></div>
</body>
</html>