i dont understand why i have to use bracket notation instead of dot notation on the part where i write result = lookup.val to pass this challenge. All help is welcome
// Setup
function phoneticLookup(val) {
let result = "";
// Only change code below this line
const lookup = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Frank"
}
result = lookup.val
// Only change code above this line
return result;
}
phoneticLookup("charlie");
**Challenge:** Basic JavaScript - Using Objects for Lookups
**Link to the challenge:**
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups