After completing the Basic Javascript all other javascript sections have bugs in the exercise to the point where you cannot submit answers (correct or not) to complete the exercise.
Anyone else have this issue. Is there a way to fix this?
After completing the Basic Javascript all other javascript sections have bugs in the exercise to the point where you cannot submit answers (correct or not) to complete the exercise.
Anyone else have this issue. Is there a way to fix this?
Reloading the page usually fixes problems of this nature. Is there a specific challenge causing this issue? What browser are you using?
Iāve tried reloading, to no avail. Even tried signing out and signing back in later and trying again. No luck. My browser is chrome. There are a lot of exercises that donāt work in ES6, a few in Regular Expressions at the end, two at the end of Basic Data Structures. Thatās so far.
What do you mean that they donāt work? That the tests donāt pass regardless of what you try or that the tests are stuck at running tests
written in the console?
Can you post an example of a challenge and the code you were using to solve it?
The challenge is āES6: Use the Rest Operator with Function Parameters.ā
Wants me to āModify the function āsumā so that it uses the rest operator and it works in the same way with any number of parameters.ā
original code is this:
const sum = (function() {
āuse strictā;
return function sum(x, y, z) {
const args = [ x, y, z ];
return args.reduce((a, b) => a + b, 0);
};
})();
console.log(sum(1, 2, 3)); // 6
After working on it and doing some research I did this:
const sum = (function() {
āuse strictā;
return function sum(ā¦z) {
return z.reduce((a,b) => a+b, 0);
};
})();
console.log(sum(1, 2, 3)); // 6
It tells me āThe sum function uses the ⦠spread operator on the args parameter.ā When run the test.
Well, you are using it on the z
parameter⦠try actually using the rest operator with the args
parameter
Well, that was much appreciated Can I ask you about another or just make a new topic?
You can try asking here - usually it is recommended one challenge per topic but if it is just a question of tests interpretationā¦