Skip to content

Commit 59c786d

Browse files
committed
I have completed Debug/adress.js
1 parent 96d077b commit 59c786d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Sprint-2/debug/address.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Predict and explain first...
2+
//if you run this code with console.log('My house number is ${address[0]}'); it well log out 'My house number is undefined' becouse adress is an object and not an array.
3+
// to fix this we need to remove (`My house number is ${address[0]}`); and chnage it to (adress.houseNumber) becouse we need to access the houseNumber property of the address object.
4+
// Then it well log out 42 as expected.
25

36
// This code should log out the houseNumber from the address object
47
// but it isn't working...
@@ -12,4 +15,4 @@ const address = {
1215
postcode: "XYZ 123",
1316
};
1417

15-
console.log(`My house number is ${address[0]}`);
18+
console.log(address.houseNumber);

0 commit comments

Comments
 (0)