lookup对象。使用它来查找val属性的值,并赋值给result变量。
phoneticLookup("alpha")应该等于"Adams"。
testString: assert(phoneticLookup("alpha") === 'Adams');
- text: phoneticLookup("bravo")应该等于"Boston"。
testString: assert(phoneticLookup("bravo") === 'Boston');
- text: phoneticLookup("charlie")应该等于"Chicago"。
testString: assert(phoneticLookup("charlie") === 'Chicago');
- text: phoneticLookup("delta")应该等于"Denver"。
testString: assert(phoneticLookup("delta") === 'Denver');
- text: phoneticLookup("echo")应该等于"Easy"。
testString: assert(phoneticLookup("echo") === 'Easy');
- text: phoneticLookup("foxtrot")应该等于"Frank"。
testString: assert(phoneticLookup("foxtrot") === 'Frank');
- text: phoneticLookup("")应该等于undefined。
testString: assert(typeof phoneticLookup("") === 'undefined');
- text: 请不要修改return语句。
testString: assert(code.match(/return\sresult;/));
- text: 请不要使用case,switch,或if语句。
testString: assert(!/case|switch|if/g.test(code.replace(/([/]{2}.*)|([/][*][^/*]*[*][/])/g,'')));
```