Basic JavaScript - Using Objects for Lookups

My Lookup code isnt going through, can someone please help me out?

Your code so far

// Setup
function phoneticLookup(val) {
  let result = "";

  // Only change code below this line
let lookup = {
  "alpha": "Adams",
  "Bravo": "Boston",
  "charlie": "Chicago",
  "delta": "Denver",
  "echo": "Easy",
  "foxtrot": "Frank"
result = lookup(val)

  // Only change code above this line
  return result;


Your browser information:

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

Challenge: Basic JavaScript - Using Objects for Lookups

Link to the challenge:

You normally use parentheses () when you are trying to call a function, which is why you are getting the error: TypeError: lookup is not a function. Try looking up how to access values in an object, specifically with a variable.

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