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.

Basic Javascript in beta- correct code won't pass without refresh on some challenges

See original GitHub issue

Challenge passing-values-to-functions-with-arguments has an issue. User Agent is: Chrome/58.0.3029.110 Please describe how to reproduce this issue, and include links to screenshots if possible.

// Example
function ourFunctionWithArgs(a, b) {
  console.log(a - b);
}
ourFunctionWithArgs(10, 5); // Outputs 5

// Only change code below this line.
function functionWithArgs(par1, par2) {
  console.log(par1 + par2);
}

functionWithArgs(1, 2);

This challenge as well as others (shopping list, write reusable javascript with functions, and a few other earlier ones I can’t specifically name) all have an issue where I write the correct answer and try to run, and the tests all fail, regardless of it outputting the correct answer from my code. If I reload the page and then, using the code it saved for me, run the tests, it passes and goes on. This might be something that’s already been solved but I didn’t see anything specifically about this so I wanted to share in case it was an issue for anyone else.

Using Chrome 58.0.3029.110 (64-bit), Windows 10 creator update, on an HP laptop. Happy to give any other details needed. I’ve attached a gif I made showing the issue. 2017-05-23_23-02-13

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
dhcodescommented, May 24, 2017

I can replicate it. @erictleung try doing the challenge before this one and then this one.

I’m going to hazard a guess it’s something with the capture() and uncapture() or the tail portion of this file: https://github.com/freeCodeCamp/freeCodeCamp/blob/4ed293df6ed5a46744e3d80d640431b1a54e3f18/seed/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json#L2335

0reactions
raisedadeadcommented, Dec 10, 2017

Thanks everyone, I am closing this as not reproducible any more. Please log a fresh issue, if you happen to come across this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Divide one Decimal by Another with JavaScript Test 3 Failing ...
This bug appears to come up when an incorrect answer is submitted first, then it won't accept the correct answer afterwards. I ran...
Read more >
How to resolve JavaScript Cross Browser Compatibility Issues
Learn to find Javascript cross browser compatibility issues and how to solve them. Also, read how to check JS browser compatibility with ...
Read more >
php - Update data on a page without refreshing - Stack Overflow
This method provides a simple way to load data asynchronous from a web server and place the returned HTML into the selected element....
Read more >
JavaScript Tutorial – How to Set Up a Front End Development ...
In VS Code go to the Extensions panel, search for Prettier, and then install it. Set-up-a-frontend-project.001-5. Installing the extension doesn ...
Read more >
if / else errors - learn how to fix these - Codecademy
Copy/paste all of your code in with your question, include the exercise number you are working on and the exact error message you...
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