// 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"
};
// Only change code above this line
return result;
}
phoneticLookup("charlie");
When I point to “lookup”, it says “is declared but the value is never read”.
I’m not sure what I’m doing wrong here. Please advise.
How would you access the value of alpha from the lookup object? For example loopup['alpha']. The function is meant to use its parameter “val” as the property name of the object to access. If we know val is equal “alpha”, we can say instead lookup[val]. That is pretty much the result you want to return