scrimba
Javascript for Beginners
Stand in Line
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Stand in Line
AboutCommentsNotes
Stand in Line
Expand for more info
index.js
run
preview
console
function nextInLine(arr, item) {
//Your code here
arr.push(item);
return item;
//return arr.shift(); sonucu After: [2,3,4,5,6] olur
}

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

console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6));
console.log("After: " + JSON.stringify(testArr));
Console
"Before: [1,2,3,4,5]"
,
6
,
"After: [1,2,3,4,5,6]"
,
index.html
LIVE