Using Objects for Lookups- Cannot continue

Tell us what’s happening:
I have it correct but it keeps saying it is wrong.

Your code so far


// 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("bravo");

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups/

You don’t have it correct.

Your return statement is returning empty strings which is result variable.

I don’t understand. It says not to mess with code above or below the lines.

so, between those two lines, you have to set result to… something. How can you get the value from lookup into result? Should be a single line, just before the “code above this line” line.

if val is they key to the thing you need from the lookup array, how can you use val to get to that?

  result = lookup[???????];

Got it thanks. How do I test these at the end? If I click run, it just wants to got to the next exercise since it is correct now, and nothing outputs at the bottom besides “running tests” and “tests complete”.

If it wants to go on to the next exercise, then it tested successfully. If, instead, you are wanting to keep testing them on your own AFTER, I’d download them and save them locally.

I put together a “reader” of sorts for the saved JSON files from FCC. When you save, it saves as a JSON file, with the key being “index.js” and the value being your actual code. If you save the files from FCC (via the “Download” button when it invites you to go to the next lesson), this will let you view that file.