Skip to content

Commit d4df6a4

Browse files
committed
fix the problem
1 parent 4222cda commit d4df6a4

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
@@ -12,4 +12,7 @@ const address = {
1212
postcode: "XYZ 123",
1313
};
1414

15-
console.log(`My house number is ${address[0]}`);
15+
console.log(`My house number is ${address["houseNumber"]}`);
16+
// to access the houseNumber of the object using bracket notation,
17+
// we need to use the key as a string. In this case, "houseNumber"
18+
// is the correct key, so the code should work as expected.

0 commit comments

Comments
 (0)