question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stand In Line challenge: Here's my code: But system won't allow me to proceed I don't know why?

See original GitHub issue

Challenge 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:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
erictleungcommented, Oct 6, 2016

@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!

1reaction
ghandourelagaticommented, Oct 6, 2016

Thanks a lot erictleung, you’ve been of great help. Thanks again. I passed the challenge.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found