Tell us what’s happening:
Hello Community
I just can’t pass this challenge because of the answer : “phoneticLookup(”") should equal undefined"
I don’t know where to modify the code.
**
// 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",
" " return undefined
};
result += lookup[val];
// Only change code above this line
return result;
}
phoneticLookup("");
**
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
.
Challenge: Using Objects for Lookups
Link to the challenge: