Using Objects for Lookups not passing

Tell us what’s happening:

I can’t get passed this level and so sure my code is correct:

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
result = lookup[val];
}

// Change this value to test
phoneticLookup(“charlie”);


// 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
    result = lookup[val];
}

// Change this value to test
phoneticLookup("charlie");

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/

Your function does not return anything. Maybe you deleted the “return result;”-part accidently?

function phoneticLookup(val) {
  var result = "";
  var lookup = {
    "alpha": "Adams",
    "bravo": "Boston",
    "charlie": "Chicago",
    "delta": "Denver",
    "echo": "Easy",
    "foxtrot": "Frank"
  };


result = lookup[val];

Thank you so much! I was being a bit dense there for a moment. Yep i did delete “return result” funny enough it is going through now.