Skip to content

Commit 80beecd

Browse files
authored
Merge pull request #3 from ravibhoite22/wrt-code
interview question
2 parents 0bc5570 + ddcbe75 commit 80beecd

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

Q11.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* what will be the output of the following code?
3+
*/
4+
5+
/** Q1 */
6+
7+
console.log(0.1 + 0.2 == 0.3);
8+
console.log(0.1 + 0.2 === 0.3);
9+
10+
console.log([] === []);
11+
12+
console.log({} === {});
13+
14+
var person = {
15+
name:"ravi",
16+
greet: function(){
17+
return "Hello " + this.name;
18+
}
19+
}
20+
21+
var greetFn = person.greet;
22+
23+
console.log(greetFn());
24+
25+
console.log(person.greet());

Q12.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* write a function to find missing numbers in an array in sequence 0-10
3+
*/
4+
5+
var arr = [1, 2, 4, 6, 9];
6+
7+
for (let i = 1; i <= 10; i++) {
8+
if (!arr.includes(i)) {
9+
console.log(i);
10+
}
11+
}

0 commit comments

Comments
 (0)