Issue with Objects for Lookups exercise. Help out please

Issue with Objects for Lookups exercise. Help out please
0.0 0

#1

Tell us what’s happening:
Hi friends, could you help me look at this. Can’t understand why test failed.

Your code so far

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

  // Only change code below this line
 
  
 result={
    "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("charlie");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36.

Link to the challenge:


#2

The above line is returning the object and not the value of a specific property of the object. You should probably review the previous challenge below to see how you would use the val argument in your solution.


#3

@randelldawson Yeah…Thanks, the confusion was in the comment they made. I needed to modify the return statement as return result[val]. Now working
Thanks