<p dir="auto">Even if my code is working i get this error<br>
Challenge <a href="http://www.freecodecamp.com/challenges/checkpoint-stand-in-line#?solution=%2F%2F%20Setup%0Avar%20myArr%20%3D%20%5B1%2C2%2C3%2C4%2C5%5D%3B%0A%0Afunction%20queue%28arr%2C%20item%29%20%7B%0A%20%20%2F%2F%20Your%20code%20here%0A%20%20arr.push%28item%29%3B%0A%20%20item%20%3D%20arr.shift%28%29%3B%0A%20%20return%20item%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%2F%2F%20Display%20Code%0Aconsole.log%28%22Before%3A%20%22%20%2B%20JSON.stringify%28myArr%29%29%3B%0Aconsole.log%28queue%28myArr%2C%206%29%29%3B%20%2F%2F%20Modify%20this%20line%20to%20test%0Aconsole.log%28%22After%3A%20%22%20%2B%20JSON.stringify%28myArr%29%29%3B%0A" rel="nofollow">Checkpoint: Stand in Line</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/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="// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  // Your code here
  arr.push(item);
  item = arr.shift();
  return item;  // Change this line
}

// Display Code
console.log(&quot;Before: &quot; + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log(&quot;After: &quot; + JSON.stringify(myArr));
"><pre class="notranslate"><span class="pl-c">// Setup</span>
<span class="pl-k">var</span> <span class="pl-s1">myArr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

<span class="pl-k">function</span> <span class="pl-en">queue</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">,</span> <span class="pl-s1">item</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-c">// Your code here</span>
  <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">item</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">item</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">return</span> <span class="pl-s1">item</span><span class="pl-kos">;</span>  <span class="pl-c">// Change this line</span>
<span class="pl-kos">}</span>

<span class="pl-c">// Display Code</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"Before: "</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">myArr</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-en">queue</span><span class="pl-kos">(</span><span class="pl-s1">myArr</span><span class="pl-kos">,</span> <span class="pl-c1">6</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Modify this line to test</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"After: "</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">myArr</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/bonfire-stand-in-line#?solution=%2F%2F%20Setup%0Avar%20myArr%20%3D%20%5B1%2C2%2C3%2C4%2C5%5D%3B%0A%0Afunction%20queue%28arr%2C%20item%29%20%7B%0A%20%20arr.push%28item%29%3B%0A%20%20return%20arr.shift%28%29%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%0A" rel="nofollow">Bonfire: Stand in Line</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_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="// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
  arr.push(item);
  return arr.shift();  // Change this line
}


"><pre class="notranslate"><span class="pl-c">// Setup</span>
<span class="pl-k">var</span> <span class="pl-s1">myArr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">,</span><span class="pl-c1">4</span><span class="pl-kos">,</span><span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

<span class="pl-k">function</span> <span class="pl-en">queue</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">,</span> <span class="pl-s1">item</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">item</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-k">return</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-c">// Change this line</span>
<span class="pl-kos">}</span>

</pre></div>
<p dir="auto">The above version passes, since the three initially-supplied calls at the bottom to Console.log have been removed.  Without the removal, submitting the code yields a stack overflow error.</p>
<p dir="auto">In other Bonfires and Waypoints that I've done (a lot of them), there was no instance where the testing code (usually, just an illustrative function call) needed to be removed for a submittal to pass.  Thus, this Bonfire does not conform to the normal pattern.</p>
<p dir="auto">IMO, providing this testing code at the bottom for this Bonfire is overkill.  By this time, if campers want to test in their own environment, they have figured out how to do so.  Also, the calls to JSON.stringify are unnecessary - console.log can handle an array of integers without it.</p>