// 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("alpha");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36.
Hi, thanks for your help. If I include
return lookup [val]; it tells me not to change the return value. and doesn’t run my code that’s why I’m stumped.
What you did, with return lookup[val] is not wrong if you were coding outside of test limits, but in this environment you need to respect certain things, or the tests wouldn’t work, like in this case change things only where allowed, even if that would mean having variables that in other situations wouldn’t be necessary, or restrictions to what you could do