File tree Expand file tree Collapse file tree
JavaScript Interview/Day 13 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ 1.
3+
4+ console.log([]==[])//false
5+ console.log([]=="")//true
6+
7+ const a = [];
8+ const b = [];
9+ console.log(a == b); // false
10+ console.log(a === b); // false
11+
12+
13+ 2.Key Points:
14+ ~~ is used to truncate the decimal part and convert a floating-point number to an integer.
15+ It does not round the number; it simply removes the fractional part.
16+ It works by performing two bitwise NOT operations.
17+
18+ function print(x){
19+ console.log(~~x)
20+ }
21+
22+ print(2.8)//2
23+
24+
25+ 3. function xyz(a,b=0,c){
26+
27+ }
28+ console.log(xyz.length)//1
29+
30+
31+
32+ function xyz(a,b,...args){
33+
34+ }
35+ console.log(xyz.length)//2
36+
37+
38+ 4.
39+ const str = "hello world";
40+ const formattedStr = str.replace(" ", "\n");
41+ console.log(formattedStr);
42+
43+ */
44+
45+
46+
47+
You can’t perform that action at this time.
0 commit comments