// 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"
};
// Only change code above this line
return result;
}
// Change this value to test
phoneticLookup(“charlie”);
You have created the object lookup, but the instructions state:
Use it to look up val and assign the associated string to the result variable.
You need to use the lookup object in such a way as capture the value of the property passed into the function (represented by val). You need to assign the value to the result variable.
In previous lessons, you have already learned how to reference the value of a specific object property, so you might want to look back 4 or 5 lessons which show you exactly how to do this.
1 Like
Thanks sir i solved the problem
Hi Randelldawson
I joined this forum today, was reading your comments and noticed you mentioned lessons. Could you please direct me to the lessons?
Thank you