Stand In Line challenge: Here's my code: But system won't allow me to proceed I don't know why?
See original GitHub issueChallenge Stand in Line has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function nextInLine(arr, item) {
// Your code here
testArr.push(item);
return testArr.shift(); // Change this line
}
// Test Setup
var testArr = [1,2,3,4,5];
// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 5)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Stand In Line challenge: Here's my code: But system won't ...
Stand In Line challenge: Here's my code: But system won't allow me to proceed I don't know why? #11073.
Read more >How to do the Stand In Line challenge? - JavaScript
For example in 1 challenge, you do 1 and learn 1 thing, and then the next challenege you do 1 and learn 1...
Read more >Common problems with two-step verification for a work or ...
Not receiving your verification code is a common problem. The problem is typically related to your mobile device and its settings. Here are...
Read more >Stand in Line - Free Code Camp - YouTube
In this JavaScript tutorial we explore the nature of writing a function with implicit returns while mutating an array. I hope that doesn't...
Read more >Stand in Line, freeCodeCamp Basic Javascript - YouTube
In this challenge we are asked to add a number to an end of an array as well as remove the first element...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ahmedghandour thanks for the issue but if you get stuck or have questions with a challenge in the future, please first ask questions to the Help Room. Hint: please review your knowledge of function scope. You can only use variables that are scoped by your function. Happy coding!
Thanks a lot erictleung, you’ve been of great help. Thanks again. I passed the challenge.