Above is the name of the challenge. I haven’t been this stumped throughout the challenges but this one, even with getting a hint and looking at everyones opinion I still am having a hard time.
That’s where I am confused. I keep thinking of that as being in a sense a name of a variable. Perhaps reading in my book before doing this section would help.
This may sound silly to ask but I’m new to this language. Throughout the challenges some of the examples…portions of each example look almost made up…however nextInLine to me does not.
I’m not asking you these questions just for, to help you at best possibility, I need to know how much you understand and not understand of the challenge
So you are having troubles interpreting the instructions, and would not be able to say what would happen to a specific input when given to the function you should write, right? you don’t know if the input is [1,2,3], 4, what is the output
it asks you to return the element that was removed , then define a variable and assign it the value of the romoved item, so:
var removed_item = arr.shift();
return removed_item; //add it to what you wrote previously (except the return you wrote)
I pretty suck too, don’t know anything in basic algorithm scripting so it makes me feel beter to help someone else
lesson is not asking you to return item (which is 6) ,look at bottom in middle console in which function nextInLine is given values to its parameters 'testArr ’ to arr and ‘6’ to item; (while going to this lesson i was also confused here: didnt knew that what values parameters of function are taking)
but instead asking you to return the element which was removed by arr.shift()