Getting stuck with Objects for Lookups

Tell us what’s happening:
I completed the 1st part but it’s the second part i get stuck with
Use it to look up val and assign the associated string to the result variable.

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"
return result;
/ 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/80.0.3987.149 Safari/537.36.

Challenge: Using Objects for Lookups

Link to the challenge:

There is no function named lookup.

1 Like

This line doesn’t do anything.

1 Like

You should only be changing code below the line shown above.

1 Like

Thanks that helped you don’'t need to read this any further or reply;
But this is how I got the answer after your help

There is only one function in the code: phoneticLookup
but, that was not what i was asked to do

So i reared the text and set it like this .
2: Use it to look up val : in the example they gave an answer to ti


2: assign the associated string to the result variable.
using result this can be done if we set it to the above the code