I looked up this
and did this:
// Only change code below this line
const count = arr.push(item);
const count1 = arr.shift();
return count1;
// Only change code above this line
and it passed. Nice… BUT I am not so certain I understand everything about this. I am afraid we’ll meet in here so much more often guys lol
I wish there were more similar tasks to this.
Thank you all for your patience
@kevinSmith or someone else, would you explain to in simple words what did I just do? Looks like when using “push/shift” etc I have to put new variable in front of it. In this case I put “count” and “count1”.
The instruction says:
The
nextInLine
function should then return the element that was removed.
I am still not sure what is that first element (removed one).