<h4 dir="auto">Challenge Name</h4>

<h4 dir="auto">Issue Description</h4>

<h4 dir="auto">Browser Information</h4>

<ul dir="auto">
<li>Browser Name, Version:</li>
<li>Operating System:</li>
<li>Mobile, Desktop, or Tablet:</li>
</ul>
<h4 dir="auto">Your Code</h4>

<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="

"><pre class="notranslate"></pre></div>
<h4 dir="auto">Screenshot</h4>
<p dir="auto">This is my code what wrong with it<br>
function nextInLine(arr, item) {<br>
// Your code here<br>
testArr.push(item);<br>
item = testArr[0];<br>
testArr.shift();<br>
return item;  // Change this line<br>
}</p>
<p dir="auto">// Test Setup<br>
var testArr = [5,6,7,8,9];</p>
<p dir="auto">// Display Code<br>
console.log("Before: " + JSON.stringify(testArr));<br>
console.log(nextInLine(testArr, 7)); // Modify this line to test<br>
console.log("After: " + JSON.stringify(testArr));<br>
see below what they want done</p>
<p dir="auto">nextInLine([], 1) should return 1<br>
nextInLine([2], 1) should return 2<br>
nextInLine([5,6,7,8,9], 1) should return 5(this is line is the only one not working<br>
After nextInLine(testArr, 10), testArr[4] should be 10</p>
<p dir="auto">see link below<br>
<a href="https://www.freecodecamp.com/challenges/stand-in-line#?solution=function%20nextInLine(arr%2C%20item)%20%7B%0A%20%20%2F%2F%20Your%20code%20here%0A%20%20testArr.push(item)%3B%0A%20%20item%20%3D%20testArr%5B0%5D%3B%0A%20%20testArr.shift()%3B%0A%20%20return%20item%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%2F%2F%20Test%20Setup%0Avar%20testArr%20%3D%20%5B5%2C6%2C7%2C8%2C9%5D%3B%0A%0A%2F%2F%20Display%20Code%0Aconsole.log(%22Before%3A%20%22%20%2B%20JSON.stringify(testArr))%3B%0Aconsole.log(nextInLine(testArr%2C%207))%3B%20%2F%2F%20Modify%20this%20line%20to%20test%0Aconsole.log(%22After%3A%20%22%20%2B%20JSON.stringify(testArr))%3B" rel="nofollow">https://www.freecodecamp.com/challenges/stand-in-line#?solution=function%20nextInLine(arr%2C%20item)%20%7B%0A%20%20%2F%2F%20Your%20code%20here%0A%20%20testArr.push(item)%3B%0A%20%20item%20%3D%20testArr%5B0%5D%3B%0A%20%20testArr.shift()%3B%0A%20%20return%20item%3B%20%20%2F%2F%20Change%20this%20line%0A%7D%0A%0A%2F%2F%20Test%20Setup%0Avar%20testArr%20%3D%20%5B5%2C6%2C7%2C8%2C9%5D%3B%0A%0A%2F%2F%20Display%20Code%0Aconsole.log(%22Before%3A%20%22%20%2B%20JSON.stringify(testArr))%3B%0Aconsole.log(nextInLine(testArr%2C%207))%3B%20%2F%2F%20Modify%20this%20line%20to%20test%0Aconsole.log(%22After%3A%20%22%20%2B%20JSON.stringify(testArr))%3B</a></p>