Stand in Line (JS) code is not running

Tell us what’s happening:

Your code so far


function nextInLine(arr, item) {
// Only change code below this line

testArr.shift();
testArr.push();

return item;
// Only change code above this line


}

// 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.

Challenge: Stand in Line

Link to the challenge:

Hello @Menny

For starters you’re not using the parameters provided in the function . And finally you should return the number that was removed.

Example:

function someName( param1, param2){
// you should use the parameters in your code block
return param1 + param2;
}

I hope this helps. And dont forget to return the required number to pass the test.

Happy coding.

Alright, thanks. tried it and i got my solution. thanks