-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJS2.html
More file actions
51 lines (45 loc) · 2.04 KB
/
JS2.html
File metadata and controls
51 lines (45 loc) · 2.04 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Java Script Tutorial 2</title>
<script>
var a = 47;
var b = "Harsh";
c = 34.55
// console.log(a);
// Opperators in Java Script
// In 3+5 '+' is the operator and 3 and 5 is operands
// 1. Unary Operator - It has Single Operand (x = -x)
// Example of unary operator
c = -c;
// console.log(c);
// 2. Binary Operator It has Two Operands (x = x+6 )
// Example of binary operator
c = 463+7;
// console.log(c);
// Operand- entities on which operators operand
var num1 = 56;
var num2 = 65;
// Arithmatic in action in javascript
console.log("The Value of num1 + num2 is "+ (num1 + num2));
console.log("The Value of num1 - num2 is "+ (num1 - num2));
console.log("The Value of num1 * num2 is "+ (num1 * num2));
console.log("The Value of num1 % num2 is "+ (num1 % num2));
console.log("The Value of num1 ** num2 is "+ (num1 ** num2)); //Exponention Operator
console.log("The Value of num1 ++ is "+ (num1 ++)); //Increment Operator
console.log("The Value of ++num1 is "+ (++ num1)); //Increment Operator
console.log("The Value of num1 -- is "+ (num1 --)); //Decrement Operator
console.log("The Value of -- num1 is "+ (-- num1)); //Decrement Operator
</script>
</head>
<body>
<div class="container">
<h1>This is a Container</h1>
<div class="box">
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Qui aperiam, inventore perspiciatis debitis odit dolor neque. Rem dolorum exercitationem laborum libero distinctio, quo reprehenderit pariatur quaerat voluptate? Fugiat laborum doloribus quo delectus perspiciatis? Veniam soluta autem cupiditate, rem quod hic beatae eveniet iste minima doloremque dolor numquam, ut quos consequuntur.</p>
</div>
</div>
</body>
</html>