-
-
Notifications
You must be signed in to change notification settings - Fork 415
Expand file tree
/
Copy path100.js
More file actions
28 lines (23 loc) · 697 Bytes
/
100.js
File metadata and controls
28 lines (23 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Predict and explain...
// What will be logged by this code?
// Check your prediction and explanation by running the code.
const person1 = {
"name": "Abdi",
"location": "London",
"id_number": 17,
};
const person2 = {
"name": "Shadi",
"job": "Software Engineer",
"location": "London",
"id_number": 28,
};
const person3 = person2;
person3.location = "Manchester";
console.log(person1.name); //
console.log(person2["name"]);
console.log(person1.id_number > person2["id_number"]);
console.log(person1.job);
console.log(person1.location === person2.location);
console.log(person1.location === person3.location);
console.log(person2.location === person3.location);