<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/using-objects-for-lookups#?solution=%2F%2F%20Setup%0Afunction%20phoneticLookup%28val%29%20%7B%0A%20%20var%20result%20%3D%20%22%22%3B%0A%20%20%2F%2F%20Only%20change%20code%20below%20this%20line%0A%20%20var%20lookup%20%3D%20%7B%0A%20%20%20%20%22alpha%22%3A%20%22Adams%22%2C%0A%20%20%20%20%22bravo%22%3A%20%22Boston%22%2C%0A%20%20%20%20%22charlie%22%3A%22Chicago%22%2C%0A%20%20%20%20%22delta%22%3A%22Denver%22%2C%0A%20%20%20%20%22echo%22%3A%20%22Easy%22%2C%0A%20%20%20%20%22foxtrot%22%3A%20%22Frank%22%0A%20%20%7D%3B%0A%20%20result%20%2B%3D%20lookup%5Bval%5D%3B%0A%20%20%2F%2F%20Only%20change%20code%20above%20this%20line%0A%20%20return%20result%3B%0A%7D%0A%0A%2F%2F%20Change%20this%20value%20to%20test%0AphoneticLookup%28%22%22%29%3B%0A" rel="nofollow">Using Objects for Lookups</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Setup
function phoneticLookup(val) {
  var result = &quot;&quot;;
  // Only change code below this line
  var lookup = {
    &quot;alpha&quot;: &quot;Adams&quot;,
    &quot;bravo&quot;: &quot;Boston&quot;,
    &quot;charlie&quot;:&quot;Chicago&quot;,
    &quot;delta&quot;:&quot;Denver&quot;,
    &quot;echo&quot;: &quot;Easy&quot;,
    &quot;foxtrot&quot;: &quot;Frank&quot;
  };
  result += lookup[val];
  // Only change code above this line
  return result;
}

// Change this value to test
phoneticLookup(&quot;&quot;);
"><pre class="notranslate"><span class="pl-c">// Setup</span>
<span class="pl-k">function</span> <span class="pl-en">phoneticLookup</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">var</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s">""</span><span class="pl-kos">;</span>
  <span class="pl-c">// Only change code below this line</span>
  <span class="pl-k">var</span> <span class="pl-s1">lookup</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-s">"alpha"</span>: <span class="pl-s">"Adams"</span><span class="pl-kos">,</span>
    <span class="pl-s">"bravo"</span>: <span class="pl-s">"Boston"</span><span class="pl-kos">,</span>
    <span class="pl-s">"charlie"</span>:<span class="pl-s">"Chicago"</span><span class="pl-kos">,</span>
    <span class="pl-s">"delta"</span>:<span class="pl-s">"Denver"</span><span class="pl-kos">,</span>
    <span class="pl-s">"echo"</span>: <span class="pl-s">"Easy"</span><span class="pl-kos">,</span>
    <span class="pl-s">"foxtrot"</span>: <span class="pl-s">"Frank"</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span>
  <span class="pl-s1">result</span> <span class="pl-c1">+=</span> <span class="pl-s1">lookup</span><span class="pl-kos">[</span><span class="pl-s1">val</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
  <span class="pl-c">// Only change code above this line</span>
  <span class="pl-k">return</span> <span class="pl-s1">result</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-c">// Change this value to test</span>
<span class="pl-en">phoneticLookup</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/using-objects-for-lookups#?solution=%2F%2F%20Setup%0Afunction%20phoneticLookup%28val%29%20%7B%0A%20%20var%20result%20%3D%20%22%22%3B%0A%20%20%2F%2F%20Only%20change%20code%20below%20this%20line%0A%20%20var%20lookup%20%3D%20%7B%0A%20%20%20%20%22alpha%22%3A%20%22Adams%22%2C%0A%20%20%20%20%22bravo%22%3A%20%22Boston%22%2C%0A%20%20%20%20%22charlie%22%3A%22Chicago%22%2C%0A%20%20%20%20%22delta%22%3A%22Denver%22%2C%0A%20%20%20%20%22echo%22%3A%20%22Easy%22%2C%0A%20%20%20%20%22foxtrot%22%3A%20%22Frank%22%0A%20%20%7D%3B%0A%20%20result%20%2B%3D%20lookup%5Bval%5D%3B%0A%20%20%2F%2F%20Only%20change%20code%20above%20this%20line%0A%20%20return%20result%3B%0A%7D%0A%0A%2F%2F%20Change%20this%20value%20to%20test%0AphoneticLookup%28%22%22%29%3B%0A" rel="nofollow">Using Objects for Lookups</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Setup
function phoneticLookup(val) {
  var result = &quot;&quot;;
  // Only change code below this line
  var lookup = {
    &quot;alpha&quot;: &quot;Adams&quot;,
    &quot;bravo&quot;: &quot;Boston&quot;,
    &quot;charlie&quot;:&quot;Chicago&quot;,
    &quot;delta&quot;:&quot;Denver&quot;,
    &quot;echo&quot;: &quot;Easy&quot;,
    &quot;foxtrot&quot;: &quot;Frank&quot;
  };
  result += lookup[val];
  // Only change code above this line
  return result;
}

// Change this value to test
phoneticLookup(&quot;&quot;);
"><pre class="notranslate"><span class="pl-c">// Setup</span>
<span class="pl-k">function</span> <span class="pl-en">phoneticLookup</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">var</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s">""</span><span class="pl-kos">;</span>
  <span class="pl-c">// Only change code below this line</span>
  <span class="pl-k">var</span> <span class="pl-s1">lookup</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-s">"alpha"</span>: <span class="pl-s">"Adams"</span><span class="pl-kos">,</span>
    <span class="pl-s">"bravo"</span>: <span class="pl-s">"Boston"</span><span class="pl-kos">,</span>
    <span class="pl-s">"charlie"</span>:<span class="pl-s">"Chicago"</span><span class="pl-kos">,</span>
    <span class="pl-s">"delta"</span>:<span class="pl-s">"Denver"</span><span class="pl-kos">,</span>
    <span class="pl-s">"echo"</span>: <span class="pl-s">"Easy"</span><span class="pl-kos">,</span>
    <span class="pl-s">"foxtrot"</span>: <span class="pl-s">"Frank"</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span>
  <span class="pl-s1">result</span> <span class="pl-c1">+=</span> <span class="pl-s1">lookup</span><span class="pl-kos">[</span><span class="pl-s1">val</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
  <span class="pl-c">// Only change code above this line</span>
  <span class="pl-k">return</span> <span class="pl-s1">result</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-c">// Change this value to test</span>
<span class="pl-en">phoneticLookup</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>