Skip to content

Instantly share code, notes, and snippets.

@jay-dee7
Forked from jastuccio/objects-for-lookups.js
Created March 6, 2017 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jay-dee7/34e43a24cc204c1d0212ba532323074b to your computer and use it in GitHub Desktop.
Save jay-dee7/34e43a24cc204c1d0212ba532323074b to your computer and use it in GitHub Desktop.
// 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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment