BasicJavascript: Using Objects for Look Ups?

type or paste code here
```// 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"
   };
   result = lookup{val};

  // Only change code above this line
  return result;
}

// Change this value to test
phoneticLookup("charlie");

I tried it on my google chrome console and it worked but this site it refuses I was screaming from the bottom that ADAM IS FREAKING ALPHA NOW FUCK YOU.

This is incorrect syntax. Also, try stepping away from the computer occasionally and taking some deep breaths.

2 Likes

Thank you very much :smiley:
To me I first wanted to do one week programming and one week physics but I think I will make it 2 weeks math, physics and one week programming.
This really is stressful.

Thanks for advice it worked after all :smiley: