// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
var lookup = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Frank",
};
result = lookup.val;
// Only change code above this line
return result;
}
// Change this value to test
phoneticLookup("charlie");
Hello!
I would like to know why I can’t use the dot operator on result = lookup.val;
I used the bracket notation and it worked fine, why doesn’t the dot operator work that way?