Misleading curriculum

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/wherefore-art-thou

Well, from the pop-up of possible forum posts, this is not an isolated incident.

Every solution given ignores the part of the instructions to not change code below the line which has a “return arr” beneath it and returns above it. While it is possible to come to that solution, none of your solutions (3) do that. It’s not helpful to students when the instructions aren’t followed.

I don’t see anything misleading about the posted solutions. They solve the challenge.

Note - the guide solutions are not part of the curriculum. The curriculum certainly is not being misleading here.

I created a issue proposing we remove those comments.

When you create a solution that solves the challenge (passes the tests), that is the point.

Not sure what you mean here. Who is not following the instructions?

The starting code is just trying to reinforce the instructions that expect you to return an array. As @JeremyLT and I have said, you can create any solution that solves the challenge.

To hopefully make you feel better, I added a 4th solution that does not change code before or after the comment, even though it does not make any difference. Those comments are just an attempt to help you and by no means are you required to follow them, unless the test/hint specifically tells you not to do something. There are some early challenges (not the algorithm ones) that explicitly tell you not to change certain code. It is because changing the starting code could invalidate the tests in some way. For this particular challenge, there was nothing in the challenge instructions or test messages telling you to to use specific variables names in a specific way.

Surely (let’s hope) you can put your mind back into the mind of before you know what you know now and say to yourself, "they have ‘return arr’ there… which means I have to figure a way to solve this with the return arr.

If it’s optional, then remove it instead of adding needless confusion. This point was raised in the comments of the solution last year.

I did not create the challenge. If you have a suggestion for how it should be changed, then create an issue on GitHub with your suggestion. Most changes come from volunteers. Feel free to volunteer to improve the curriculum.

There has not been a comment made on the Guide for this challenge since May of 2020 and that comment had nothing to do with a complaint about not returning arr.

Maybe you didn’t read this:


I agree that the comment is not needed, but claiming that the curriculum is “misleading” is incorrect, at best.

I actually made a suggestion back in August of 2020 about this. I did not implement it, but someone else could have if they wanted to.