--- id: 56533eb9ac21ba0edf2244ca title: Using Objects for Lookups challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(phoneticLookup("alpha") === "Adams", "phoneticLookup("alpha") should equal "Adams"");' - text: '' testString: 'assert(phoneticLookup("bravo") === "Boston", "phoneticLookup("bravo") should equal "Boston"");' - text: '' testString: 'assert(phoneticLookup("charlie") === "Chicago", "phoneticLookup("charlie") should equal "Chicago"");' - text: '' testString: 'assert(phoneticLookup("delta") === "Denver", "phoneticLookup("delta") should equal "Denver"");' - text: '' testString: 'assert(phoneticLookup("echo") === "Easy", "phoneticLookup("echo") should equal "Easy"");' - text: '' testString: 'assert(phoneticLookup("foxtrot") === "Frank", "phoneticLookup("foxtrot") should equal "Frank"");' - text: '' testString: 'assert(typeof phoneticLookup("") === "undefined", "phoneticLookup("") should equal undefined");' - text: '' testString: 'assert(code.match(/return\sresult;/), "You should not modify the return statement");' - text: '' testString: 'assert(!/case|switch|if/g.test(code.replace(/([/]{2}.*)|([/][*][^/*]*[*][/])/g,"")), "You should not use case, switch, or if statements"); ' ```
## Challenge Seed
```js // Setup function phoneticLookup(val) { var result = ""; // Only change code below this line switch(val) { case "alpha": result = "Adams"; break; case "bravo": result = "Boston"; break; case "charlie": result = "Chicago"; break; case "delta": result = "Denver"; break; case "echo": result = "Easy"; break; case "foxtrot": result = "Frank"; } // Only change code above this line return result; } // Change this value to test phoneticLookup("charlie"); ```
## Solution
```js // solution required ```