-
Notifications
You must be signed in to change notification settings - Fork 0
/
42.html
47 lines (40 loc) · 1.59 KB
/
42.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
<!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>Operators</title>
</head>
<body>
<h2>Operators in javascript</h2>
<p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. At, numquam consectetur! Asperiores modi reiciendis
repellendus dicta! Dolore excepturi alias numquam placeat similique quos incidunt nulla temporibus eligendi
atque! Iure, labore cum architecto quia tempora impedit dolorem dolores quaerat, obcaecati sit ducimus eaque
quibusdam provident ut repellendus minima? Libero iure nemo consectetur at ut. Rem.
</p>
<script>
// variables in JS
// JavaScript is a dynamic type language, means you don't need to specify type of the variable because it is dynamically used by JavaScript engine.
var name = "Soumyo Chakravorty";
console.log("My name is " + name);
var a = 10;
var b = 12;
c=-b;
console.log("a = " + a);
console.log("b = " + b);
console.log("c = " + c);
// types of operators
// Unary and binary
// using operators
console.log("a+b = " + (a + b));
console.log("a-b = " + (a - b));
console.log("a*b = " + (a * b));
console.log("a/b = " + (a / b));
console.log("a**b = " + (a ** b));
console.log("b++ = " + (b++));
console.log("++b = " + (++b));
</script>
</body>
</html>