Last active
March 13, 2023 11:29
-
-
Save periakteon/7b50ff6ab432540c81565c150dc1bf3d to your computer and use it in GitHub Desktop.
Stand in Line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function nextInLine(arr, item) { | |
return item; | |
} | |
let testArr = [1, 2, 3, 4, 5]; | |
console.log("Before: " + JSON.stringify(testArr)); | |
// Before: [1,2,3,4,5] | |
console.log(nextInLine(testArr, 6)); | |
// 6 | |
console.log("After: " + JSON.stringify(testArr)); | |
// After: [1,2,3,4,5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment