Help i can't get this correct

Tell us what’s happening:
I can’t get this correct

Your code so far

function nextInLine(arr, item) {
// Only change code below this line
function nextInLine(arr, item) {
// Your code here
var removed = arr.shift();
return removed; // Change this line
return arr.shift(); 


// Setup
var testArr = [1,2,3,4,5];

// Display code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6));
console.log("After: " + JSON.stringify(testArr));

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13505.100.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.142 Safari/537.36.

Challenge: Stand in Line

Link to the challenge:

Hi, try pressing Reset All Code then there is hints and solution here freeCodeCamp Challenge Guide: Profile Lookup Also: to look up array.shift() and array.push()
Have a nice day

I would try to avoid looking at solutions before you have solved this challenge.

It looks like you pasted another solution into your code, which means you have this confusing function pasted into another function problem.

I would reset the code and start fresh.

Do you have any questions about how to

Add the number to the end of the array


remove the first element of the array


return the element that was removed