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

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

About this issue

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

Most upvoted comments

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