-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlec2.html
More file actions
107 lines (80 loc) · 2.16 KB
/
lec2.html
File metadata and controls
107 lines (80 loc) · 2.16 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// console.log( false &&true) ;
// console.log(false && false && true && true);
// console.log(true || false || false || true);
// console.log(5&4);
// // 5=> 1 0 1
// // 4=> 1 0 0
// // 1 0 0
// if(true){
// console.log("hello");
// }
// else{
// console.log("hii")
// }
// if(""){
// console.log("hello");
// }
// else{
// console.log("hii")
// }
// if(" "){
// console.log("hello");
// }
// else{
// console.log("hii")
// }
// if(5&0){ // 5&0 = 0
// console.log("hello");
// }
// else{
// console.log("hii")
// }
// if(1){
// console.log("hello");
// }
// else{
// console.log("hii")
// }
// let data = prompt("enter value")
// if(data%2==0){
// console.log("even");
// }
// else{
// console.log("odd");
// }
// let isBool=false
// isBool?console.log("hello"):console.log("hiii");
// let data = prompt("enter value");
// console.log(Number(data));
// console.log(+data);
console.log(5-"hello");//Nan
console.log("hello"-"hii");//NaN
console.log(typeof NaN);
//Non primitive data types
//Object ARRay
//object= pair of key and value
const student={
name1:"ram",
name2:"sam",
age:30
}
student.age=20
console.log(student.name1);
console.log(student.age);
console.log({} == {});//false
let a={name:"anu"}
//let b={name:"anu"}
let b=a;
console.log(a==b);
</script>
</body>
</html>