Tell us what’s happening:
I get the following console error: Syntax Error: missing } after property list.
I also get these items wrong:
X phoneticLookup("") should equal undefined
X You should not use case, switch, or if statements
I am not sure how to leave the phonetic lookup undefined. I tried switching to “” and nothing happened. As for not using case, switch, or if statements, I don’t see how I could be, so I am a bit confused. Thanks in advance.
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
return result = lookout[val];
}
// Change this value to test
phoneticLookup("charlie");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101 Firefox/56.0
.
Link to the challenge:
https://www.freecodecamp.org/challenges/using-objects-for-lookups