-
Notifications
You must be signed in to change notification settings - Fork 5
/
console-1659432336394.log
121 lines (121 loc) · 2.02 KB
/
console-1659432336394.log
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
function add(){
console.log(z);
if(10>2){
var z = 100;
}
console.log(z);
}
undefined
add();
VM384:2 undefined
VM384:6 100
undefined
var q;
undefined
var q =10000;
undefined
window;
Window {window: Window, self: Window, document: document, name: '', location: Location, …}
typeof window;
'object'
window.q;
10000
this;
Window {window: Window, self: Window, document: document, name: '', location: Location, …}
window == this;
true
10 == 10;
true
10 === 10;
true
10 =="10"
true
function add(){
console.log(z);
if(10>2){
let z = 100;
}
console.log(z);
}
undefined
add();
VM730:2 Uncaught ReferenceError: z is not defined
at add (<anonymous>:2:17)
at <anonymous>:1:1
add @ VM730:2
(anonymous) @ VM753:1
function add(){
var z = 200;
console.log(z);
if(10>2){
var z = 100;
}
var z = 300;
console.log(z);
}
undefined
add();
VM840:3 200
VM840:8 300
undefined
function add(){
let z = 200;
console.log(z);
if(10>2){
let z = 100;
}
let z = 300;
console.log(z);
}
VM901:7 Uncaught SyntaxError: Identifier 'z' has already been declared
function add(){
let z = 200;
console.log(z);
if(10>2){
let z = 100;
}
//let z = 300;
console.log(z);
}
undefined
function add(){
console.log(z);
let z = 200;
console.log(z);
if(10>2){
console.log(z);
let z = 100;
}
//let z = 300;
console.log(z);
}
undefined
add();
VM993:2 Uncaught ReferenceError: Cannot access 'z' before initialization
at add (<anonymous>:2:17)
at <anonymous>:1:1
add @ VM993:2
(anonymous) @ VM1023:1
function add(){
//console.log(z);
let z = 200;
console.log(z);
if(10>2){
console.log(z);
let z = 100;
}
//let z = 300;
console.log(z);
}
undefined
add();
VM1035:4 200
VM1035:6 Uncaught ReferenceError: Cannot access 'z' before initialization
at add (<anonymous>:6:21)
at <anonymous>:1:1
add @ VM1035:6
(anonymous) @ VM1058:1
var name = prompt("Enter the Name ");
undefined
name;
'Amit'