// Setup
function phoneticLookup(val) {
let result = "";
// Only change code below this line
val lookup = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo": "Easy",
"foxtrot": "Frank"
};
result = lookup[val];
// Only change code above this line
return result;
}
phoneticLookup("charlie");
Convert the switch statement into an object called lookup. Use it to look up val and assign the associated string to the result variable. Thats what the task says do so I think so.
Just keep practicing writing code. Repetition is the key. If you are struggling with a challenge, then back up a few challenges and redo them. You can reset the code for any challenge and rework it from scratch.