Skip to content

Commit c70369c

Browse files
committed
Day 13 js interview
1 parent 6562158 commit c70369c

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+

0 commit comments

Comments
 (0)