Stand in Line- topic of java script

Tell us what’s happening:
i just no understand what it tell is?

Your code so far

function nextInLine(arr, item) {
  // Your code here
  return item;  // Change this line

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

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

Do you mean you don’t understand the challenge?

Add item to the end of the array, then remove the first element of the array. And return the removed item.

You have two things passed in your function, an array, arr, and a number, item. Add item at the end of arr then remove and return the first element of the array

1 Like

thanks for contributing!..