Unexpected token on line 20

Tell us what’s happening:
Describe your issue in detail here.
unexpected syntax error on line 20

   **Your code so far**
// Setup
function phoneticLookup(val) {
 let result = "";

 // Only change code below this line
 function phoneticLookup(val) {
 var result="";
 var lookup = {
   "alpha": "Adams",
   "bravo": "Boston",
   "charlie": "Chicago",
   "delta": "Denver",
   "echo": "Easy",
   "foxtrot": "Frank"
result = lookup[val];
 // Only change code above this line

   **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36 Edg/103.0.1264.49

Challenge: Basic JavaScript - Using Objects for Lookups

Link to the challenge:

as you have two functions definitions, the error says you are missing a closing }

instead you should remove one of the function definitions

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.