forked from brainmentorspvtltd/MERN_DIT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole-1628318003707.log
386 lines (385 loc) · 6.35 KB
/
console-1628318003707.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
var a;// variable declare
undefined
typeof a;
"undefined"
a;
undefined
a=100;
100
typeof a;
"number"
a=1;
1
typeof a;
"number"
a=454545654654654;
454545654654654
typeof a;
"number"
a=90.20;
90.2
typeof a;
"number"
a=545.3232323232323
545.3232323232323
typeof a;
"number"
a=100/0;
Infinity
typeof a;
"number"
a=100;
100
var b = "Amit";
undefined
typeof a;
"number"
typeof b;
"string"
a + b
"100Amit"
var c = a - b;
undefined
c;
NaN
typeof c;
"number"
'Ur Balance is '+c;
"Ur Balance is NaN"
isNaN(c);
true
c;
NaN
isNaN(c)?0:c;
0
'Ur Balance is '+(isNaN(c)?0:c);
"Ur Balance is 0"
var c= 100/0;
undefined
c;
Infinity
isFinite(c)
false
isFinite(c)?c:0
0
var a = 100;
undefined
var b = "200";
undefined
a + b;
"100200"
a + parseInt(b);
300
b = "200.90";
"200.90"
a + parseFloat(b);
300.9
window;
Window {window: Window, self: Window, document: document, name: "", location: Location, …}
typeof window;
"object"
window instanceof Window;
true
typeof Window;
"function"
window.isNaN(c);
false
window.parseInt("9999");
9999
window.open('https://www.brain-mentors.com');
Window {window: Window, self: Window, document: document, name: "", location: Location, …}
var x = "Amit";
undefined
typeof x;
"string"
x = 'Amit';
"Amit"
typeof x;
"string"
x= 'A';
"A"
typeof x;
"string"
x= `gjdhgfdjkghfjkhgjkfdghkjdfhgkfhgkhfjdkj
ghfdkjgjkfdhgkjhfdghkdf
ghdfkjhgjkfdhgkjhfdjk
ghdfkjgh`;
"gjdhgfdjkghfjkhgjkfdghkjdfhgkfhgkhfjdkj\nghfdkjgjkfdhgkjhfdghkdf\nghdfkjhgjkfdhgkjhfdjk\nghdfkjgh"
typeof x;
"string"
x;
"gjdhgfdjkghfjkhgjkfdghkjdfhgkfhgkhfjdkj\nghfdkjgjkfdhgkjhfdghkdf\nghdfkjhgjkfdhgkjhfdjk\nghdfkjgh"
a = 100;
100
b = 200;
200
c = a + b;
300
"A is "+a+" B is "+b+" c is "+c;
"A is 100 B is 200 c is 300"
`A is ${a} B is ${b} c is ${c}`;
"A is 100 B is 200 c is 300"
var c = true;
undefined
typeof c;
"boolean"
c = false;
false
typeof c;
"boolean"
true + true;
2
true - false
1
100 + true;
101
100 + "100"
"100100"
100 - "100"
0
100 * "10"
1000
100 / "10"
10
var a = Number.MAX_SAFE_INTEGER;
undefined
a;
9007199254740991
++a;
9007199254740992
++a;
9007199254740992
++a;
9007199254740992
++a;
9007199254740992
++a;
9007199254740992
var r = 9007199254740992 + 534423432423423
undefined
typeof r;
"number"
r;
9541622687164416
a= Number.MAX_SAFE_INTEGER;
9007199254740991
++a;
9007199254740992
++a;
9007199254740992
a= 9007199254740992n;
9007199254740992n
typeof a;
"bigint"
a + 8654654435534534553n
8663661634789275545n
c = a + 8654654435534534553n
8663661634789275545n
typeof c;
"bigint"
c;
8663661634789275545n
var f = BigInt("53453453534534535432534534");
undefined
typeof f;
"bigint"
f;
53453453534534535432534534n
100n + 100;
VM2710:1 Uncaught TypeError: Cannot mix BigInt and other types, use explicit conversions
at <anonymous>:1:6
(anonymous) @ VM2710:1
100n + 100n
200n
var arr = [10,20,30,40];
undefined
typeof arr;
"object"
arr instanceof Array;
true
typeof Array;
"function"
arr[0];
10
arr[1];
20
arr.length;
4
arr.push(99999);
5
arr;
(5) [10, 20, 30, 40, 99999]
arr.pop();
99999
arr;
(4) [10, 20, 30, 40]
arr = null;
null
typeof arr;
"object"
arr.length;
VM3165:1 Uncaught TypeError: Cannot read property 'length' of null
at <anonymous>:1:5
(anonymous) @ VM3165:1
var t1 ;
undefined
typeof t1;
"undefined"
var t2 = null;
undefined
typeof t2;
"object"
1000 + t1;
NaN
1000 + undefined
NaN
1000 + null
1000
undefined == null
true
undefined === null;
false
var price = 10000;
undefined
price;
10000
var price = 10000.20;
undefined
price;
10000.2
price.toLocaleString('hi-IN');
"10,000.2"
price.toLocaleString('fr-FR');
"10 000,2"
price;
10000.2
var formattedPrice = price.toLocaleString('fr-FR');
undefined
formattedPrice
"10 000,2"
price;
10000.2
var name = "Amit";
undefined
name.toUpperCase();
"AMIT"
name;
"Amit"
var t = name.toUpperCase();
undefined
t;
"AMIT"
name;
"Amit"
var emp = {id:1001, name:'Amit'};
undefined
typeof emp;
"object"
emp instanceof Object;
true
typeof Object;
"function"
var arr = [10,20];
undefined
typeof arr;
"object"
arr instanceof Array;
true
arr instanceof Object;
true
emp;
{id: 1001, name: "Amit"}
emp.id;
1001
emp.name;
"Amit"
var f = emp;
undefined
f;
{id: 1001, name: "Amit"}
f === emp;
true
f.id = 100000;
100000
emp;
{id: 100000, name: "Amit"}
var arr= [10,90,20,30,40,50];
undefined
arr.sort();
(6) [10, 20, 30, 40, 50, 90]
arr;
(6) [10, 20, 30, 40, 50, 90]
var arr= [10,90,20,30,40,50];
undefined
var vv = [...arr];
undefined
vv;
(6) [10, 90, 20, 30, 40, 50]
arr;
(6) [10, 90, 20, 30, 40, 50]
vv === arr;
false
vv[0] =324343;
324343
vv;
(6) [324343, 90, 20, 30, 40, 50]
arr;
(6) [10, 90, 20, 30, 40, 50]
emp;
{id: 100000, name: "Amit"}
var y = {...emp};
undefined
y;
{id: 100000, name: "Amit"}
y === emp;
false
y.id = 7777;
7777
emp;
{id: 100000, name: "Amit"}
y;
{id: 7777, name: "Amit"}
var t = 1000;
undefined
typeof t;
"number"
t.toString();
"1000"
var n = "Amit";
undefined
typeof n;
"string"
n.toUpperCase();
"AMIT"
n.toLowerCase();
"amit"
n.charAt(0);
"A"
var e = 1000;
undefined
typeof e;
"number"
var e= new Number(1000);
undefined
typeof e;
"object"
typeof Number;
"function"
var g = 1000;
undefined
typeof g;
"number"
var f = new String("Hello");
undefined
typeof String;
"function"
typeof f;
"object"
var bb = "Hello";
undefined
typeof bb;
"string"
f;
String {"Hello"}0: "H"1: "e"2: "l"3: "l"4: "o"length: 5__proto__: Stringanchor: ƒ anchor()big: ƒ big()blink: ƒ blink()bold: ƒ bold()charAt: ƒ charAt()charCodeAt: ƒ charCodeAt()codePointAt: ƒ codePointAt()concat: ƒ concat()constructor: ƒ String()endsWith: ƒ endsWith()fixed: ƒ fixed()fontcolor: ƒ fontcolor()fontsize: ƒ fontsize()includes: ƒ includes()indexOf: ƒ indexOf()italics: ƒ italics()lastIndexOf: ƒ lastIndexOf()length: 0link: ƒ link()localeCompare: ƒ localeCompare()match: ƒ match()matchAll: ƒ matchAll()normalize: ƒ normalize()padEnd: ƒ padEnd()padStart: ƒ padStart()repeat: ƒ repeat()replace: ƒ replace()replaceAll: ƒ replaceAll()search: ƒ search()slice: ƒ slice()small: ƒ small()split: ƒ split()startsWith: ƒ startsWith()strike: ƒ strike()sub: ƒ sub()substr: ƒ substr()substring: ƒ substring()sup: ƒ sup()toLocaleLowerCase: ƒ toLocaleLowerCase()toLocaleUpperCase: ƒ toLocaleUpperCase()toLowerCase: ƒ toLowerCase()toString: ƒ toString()toUpperCase: ƒ toUpperCase()trim: ƒ trim()trimEnd: ƒ trimEnd()trimLeft: ƒ trimStart()trimRight: ƒ trimEnd()trimStart: ƒ trimStart()valueOf: ƒ valueOf()Symbol(Symbol.iterator): ƒ [Symbol.iterator]()__proto__: Object[[PrimitiveValue]]: ""[[PrimitiveValue]]: "Hello"
bb;
"Hello"