We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b04a52 commit 7d053a2Copy full SHA for 7d053a2
1 file changed
JavaScript Interview/Day 14/demo.js
@@ -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