Skip to content

Instantly share code, notes, and snippets.

@ientropic
Created May 3, 2016 12:49
Show Gist options
  • Save ientropic/a1d920c6acf177ed7bf6819bc0dd4846 to your computer and use it in GitHub Desktop.
Save ientropic/a1d920c6acf177ed7bf6819bc0dd4846 to your computer and use it in GitHub Desktop.
// Setup
function phoneticLookup(val) {
var result = "";
// Only change code below this line
var phoneticLookup = {
Adams:"alpha",
2:"Boston",
charlie:"Chicago",
4:"Denver",
5:"Easy",
6:"Frank"
};
/*
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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment