I’m trying to go back to earlier lessons to do the record collection lesson eventually.
But I can’t solve this one. I just can’t work it out what I’m missing and not doing.
// Setup
function phoneticLookup(val) {
let result = "";
// Only change code below this line
lookup = {
"alpha":"Adams",
"bravo": "Boston",
"charlie":"Chicago",
"delta": "Denver",
"echo":"Easy",
"foxtrot":"Frank"
};
// Only change code above this line
return result;
}
phoneticLookup("charlie");
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15
I’ve declared the variable now. Sorry I’ve been trying to code almost all afternoon and I’m forgetting things.
The value is an empty string but I don’t know what to do with it. I can’t make it be the right thing.
// Setup
function phoneticLookup(val) {
let result = "";
// Only change code below this line
var lookup = {
"alpha":"Adams",
"bravo": "Boston",
"charlie":"Chicago",
"delta": "Denver",
"echo":"Easy",
"foxtrot":"Frank"
};
// Only change code above this line
result = lookup;
return result;
}
phoneticLookup("charlie");