-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path48JsDataTypes&Operator.html
More file actions
42 lines (38 loc) · 1.44 KB
/
48JsDataTypes&Operator.html
File metadata and controls
42 lines (38 loc) · 1.44 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
<!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>Data types & Operators</title>
<script>
var a = 78;
var b = "Chintan";
c = 67.55;
console.log(a);
console.log(c);
// Two types of operators are there in java script
// 1. Unary operator:It has single operand
c = -c;
console.log(c);
// 2. Binary operator: It has two operand(x = x + 6)
c = 452 + 6;
console.log(c);
var num1 = 5;
var num2 = 2;
console.log("The vlaue of num1 + num2 is: "+ (num1 + num2));
console.log("The vlaue of num1 - num2 is: "+ (num1 - num2));
console.log("The vlaue of num1 * num2 is: "+ (num1 * num2));
console.log("The vlaue of num1 / num2 is: "+ (num1 / num2));
console.log("The vlaue of num1 ** num2 is: "+ (num1 ** num2));
</script>
</head>
<body>
<div class="container">
<h1>This is a heading</h1>
<div class="content">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit delectus minima necessitatibus, autem assumenda vero eius eligendi nulla quos ex, similique placeat nisi molestiae iusto non harum tenetur veritatis architecto inventore quaerat deleniti reprehenderit.</p>
</div>
</div>
</body>
</html>