Basic JavaScript - Using Objects for Lookups

Getting an error, and I’m not sure why.

Your code so far

// Setup
function phoneticLookup(val) {
  let 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;
}

phoneticLookup("charlie");

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Using Objects for Lookups

Link to the challenge:

You are returning this result without changing it

But it’s an empty string

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