<p dir="auto"><code class="notranslate">removedFromOurArray = ourArray.shift(); // removedFromOurArray now equals "Stimpson" and ourArray now</code><br>
Is missing the var keyword.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7018580/11508661/d16f4f6e-980e-11e5-89a7-c7f70dfe4c38.PNG"><img width="928" alt="bug" src="https://cloud.githubusercontent.com/assets/7018580/11508661/d16f4f6e-980e-11e5-89a7-c7f70dfe4c38.PNG" style="max-width: 100%;"></a></p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-shift?solution=var%20ourArray%20%3D%20%5B%22Stimpson%22%2C%20%22J%22%2C%20%5B%22cat%22%5D%5D%3B%0A%0AremovedFromOurArray%20%3D%20ourArray.shift%28%29%3B%20%2F%2F%20removedFromOurArray%20now%20equals%20%22Stimpson%22%20and%20ourArray%20now%20equals%20%5B%22J%22%2C%20%5B%22cat%22%5D%5D.%0A%0Avar%20myArray%20%3D%20%5B%22John%22%2C%2023%2C%20%5B%22dog%22%2C%203%5D%5D%3B%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line.%0A%0Avar%20removedFromMyArray%20%3D%20myArray.shift%28%29%3B%0A%0A%2F%2F%20Only%20change%20code%20above%20this%20line.%0A%0A%0A%28function%28y%2C%20z%29%7Breturn%20%27myArray%20%3D%20%27%20%2B%20JSON.stringify%28y%29%20%2B%20%27%20%26%20removedFromMyArray%20%3D%20%27%20%2B%20JSON.stringify%28z%29%3B%7D%29%28myArray%2C%20removedFromMyArray%29%3B%0A" rel="nofollow">Waypoint: Manipulate Arrays With shift</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 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="var ourArray = [&quot;Stimpson&quot;, &quot;J&quot;, [&quot;cat&quot;]];

removedFromOurArray = ourArray.shift(); // removedFromOurArray now equals &quot;Stimpson&quot; and ourArray now equals [&quot;J&quot;, [&quot;cat&quot;]].

var myArray = [&quot;John&quot;, 23, [&quot;dog&quot;, 3]];

// Only change code below this line.

var removedFromMyArray = myArray.shift();

// Only change code above this line.


(function(y, z){return 'myArray = ' + JSON.stringify(y) + ' &amp; removedFromMyArray = ' + JSON.stringify(z);})(myArray, removedFromMyArray);
"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">ourArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">"Stimpson"</span><span class="pl-kos">,</span> <span class="pl-s">"J"</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"cat"</span><span class="pl-kos">]</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

<span class="pl-s1">removedFromOurArray</span> <span class="pl-c1">=</span> <span class="pl-s1">ourArray</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-c">// removedFromOurArray now equals "Stimpson" and ourArray now equals ["J", ["cat"]].</span>

<span class="pl-k">var</span> <span class="pl-s1">myArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">"John"</span><span class="pl-kos">,</span> <span class="pl-c1">23</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"dog"</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">]</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">removedFromMyArray</span> <span class="pl-c1">=</span> <span class="pl-s1">myArray</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-c">// Only change code above this line.</span>


<span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">y</span><span class="pl-kos">,</span> <span class="pl-s1">z</span><span class="pl-kos">)</span><span class="pl-kos">{</span><span class="pl-k">return</span> <span class="pl-s">'myArray = '</span> <span class="pl-c1">+</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">y</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-s">' &amp; removedFromMyArray = '</span> <span class="pl-c1">+</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">z</span><span class="pl-kos">)</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">myArray</span><span class="pl-kos">,</span> <span class="pl-s1">removedFromMyArray</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>