gerd
11/5/2016 - 2:09 PM

example of a lookup table.

example of a lookup table.

function phoneticLookup(val) {   
  var result = "";    
  var lookup = {     
  "alpha":"Adams",     
  "bravo":"Boston",     
  "charlie":"Chicago",    
  "delta": "Denver",     
  "echo": "Easy",     
  "foxtrot": "Frank"   
  };      
  result = lookup[val];    
  return result; 
}  
// Change this value to test 
phoneticLookup("charlie");