Tell us what’s happening:
Describe your issue in detail here.
I don’t understand what the last test requires. I mean this instruction: After nextInLine(testArr, 10)
, testArr[4]
should be 10
Your code so far
function nextInLine(arr, item) {
// Only change code below this line
return item;
// Only change code above this line
}
// Setup
let 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 (Linux; Android 11; TECNO PR651E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36
Challenge: Basic JavaScript - Stand in Line
Link to the challenge: