Skip to content

Commit 7d053a2

Browse files
committed
day 14 interview js
1 parent 8b04a52 commit 7d053a2

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
/*
3+
1. function checkAge(data) {
4+
if (data === { age: 18 }) {
5+
console.log("You are an adult");
6+
} else if (data == { age: 18 }) {
7+
console.log("You are still an adult");
8+
} else {
9+
console.log("Hmm....No age");
10+
}
11+
}
12+
13+
checkAge({ age: 18 }); Hmm....No age because it is an object refering diffrent memory location
14+
15+
16+
17+
2. let a = { name: 'Adarsh' };
18+
let z = a;
19+
z.name = 'Adil';
20+
console.log(a.name); //Adil
21+
*/
22+
23+
24+

0 commit comments

Comments
 (0)