<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays#?solution=function%20largestOfFour%28arr%29%20%7B%0A%20%20%2F%2F%20You%20can%20do%20this!%0A%20var%20array%2Clarge%2Carr1%3D%5B%5D%3B%0A%20%20var%20k%3Darr.length%3B%0A%20%20for%28var%20i%3D0%3Bi%3Ck%3Bi%2B%2B%29%0A%20%20%7B%20array%3Darr.shift%28%29%3B%0A%20%20%20%20var%20h%3Darray.length%3B%0A%20%20%20%20%20for%28var%20j%3D0%3Bj%3Ch%3Bj%2B%2B%29%0A%20%20%20%20%20%20%20%20%7Bif%28j%3D%3D%3D0%29%20large%3Darray%5Bj%5D%3B%0A%20%20%20%20%20%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20if%28array%5Bj%5D%3Elarge%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20large%3Darray%5Bj%5D%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%7D%0A%20%20arr1.push%28%5Blarge%5D%29%3B%0A%20%20%20%0A%20%20%7D%0A%20%20return%20'%5B'%2Barr1%2B'%5D'%3B%7D%0A%0AlargestOfFour%28%5B%5B56%2C13%2C%2027%2C%20102%2C18%2C%2026%2C99%5D%2C%20%5B32%2C%2035%2C%2037%2C%2039%5D%2C%20%5B1000%2C%201001%2C%20857%2C%201%5D%5D%29%3B%0A" rel="nofollow">Bonfire: Return Largest Numbers in Arrays</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 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="function largestOfFour(arr) {
  // You can do this!
 var array,large,arr1=[];
  var k=arr.length;
  for(var i=0;i&lt;k;i++)
  { array=arr.shift();
    var h=array.length;
     for(var j=0;j&lt;h;j++)
        {if(j===0) large=array[j];
         else {
           if(array[j]&gt;large)
             large=array[j];
         }

        }
  arr1.push([large]);

  }
  return '['+arr1+']';}

largestOfFour([[56,13, 27, 102,18, 26,99], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">largestOfFour</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-c">// You can do this!</span>
 <span class="pl-k">var</span> <span class="pl-s1">array</span><span class="pl-kos">,</span><span class="pl-s1">large</span><span class="pl-kos">,</span><span class="pl-s1">arr1</span><span class="pl-c1">=</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
  <span class="pl-k">var</span> <span class="pl-s1">k</span><span class="pl-c1">=</span><span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span>
  <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span><span class="pl-c1">=</span><span class="pl-c1">0</span><span class="pl-kos">;</span><span class="pl-s1">i</span><span class="pl-c1">&lt;</span><span class="pl-s1">k</span><span class="pl-kos">;</span><span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span>
  <span class="pl-kos">{</span> <span class="pl-s1">array</span><span class="pl-c1">=</span><span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">shift</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">var</span> <span class="pl-s1">h</span><span class="pl-c1">=</span><span class="pl-s1">array</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span>
     <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">j</span><span class="pl-c1">=</span><span class="pl-c1">0</span><span class="pl-kos">;</span><span class="pl-s1">j</span><span class="pl-c1">&lt;</span><span class="pl-s1">h</span><span class="pl-kos">;</span><span class="pl-s1">j</span><span class="pl-c1">++</span><span class="pl-kos">)</span>
        <span class="pl-kos">{</span><span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">j</span><span class="pl-c1">===</span><span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-s1">large</span><span class="pl-c1">=</span><span class="pl-s1">array</span><span class="pl-kos">[</span><span class="pl-s1">j</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
         <span class="pl-k">else</span> <span class="pl-kos">{</span>
           <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">array</span><span class="pl-kos">[</span><span class="pl-s1">j</span><span class="pl-kos">]</span><span class="pl-c1">&gt;</span><span class="pl-s1">large</span><span class="pl-kos">)</span>
             <span class="pl-s1">large</span><span class="pl-c1">=</span><span class="pl-s1">array</span><span class="pl-kos">[</span><span class="pl-s1">j</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
         <span class="pl-kos">}</span>

        <span class="pl-kos">}</span>
  <span class="pl-s1">arr1</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s1">large</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

  <span class="pl-kos">}</span>
  <span class="pl-k">return</span> <span class="pl-s">'['</span><span class="pl-c1">+</span><span class="pl-s1">arr1</span><span class="pl-c1">+</span><span class="pl-s">']'</span><span class="pl-kos">;</span><span class="pl-kos">}</span>

<span class="pl-en">largestOfFour</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-c1">56</span><span class="pl-kos">,</span><span class="pl-c1">13</span><span class="pl-kos">,</span> <span class="pl-c1">27</span><span class="pl-kos">,</span> <span class="pl-c1">102</span><span class="pl-kos">,</span><span class="pl-c1">18</span><span class="pl-kos">,</span> <span class="pl-c1">26</span><span class="pl-kos">,</span><span class="pl-c1">99</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">32</span><span class="pl-kos">,</span> <span class="pl-c1">35</span><span class="pl-kos">,</span> <span class="pl-c1">37</span><span class="pl-kos">,</span> <span class="pl-c1">39</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">1000</span><span class="pl-kos">,</span> <span class="pl-c1">1001</span><span class="pl-kos">,</span> <span class="pl-c1">857</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Update signin page to only display signin options<br>
Add signup route that uses the email-signup route handler.</p>