Tell us what’s happening:
Hello,
I believe there is a bug in the tests ran in this lesson.
the test will fail with this:
result = lookup.val;
but it will pass with this:
result = lookup[val];
Can anyone else confirm this before reporting the bug?
Thanks
Your code so far
// 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;
}
phoneticLookup("charlie");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36
.
Challenge: Using Objects for Lookups
Link to the challenge: