Hi @redeemerkyler, you should see in your console output an error like:
Before: [1,2,3,4,5]
ReferenceError: item is not defined
Which is generated from your function.
You have defined a function function nextInLine(arr, num)
that takes two arguments: one called arr
the other num
.
But then in your function body you declare
return item;
Which is not defined anywhere so it’s throwing the error.
Why don’t you walk us with your logic and explain what where you try to attempt?
Also you might want to have a look on how to format your post to make it more readable: