Wherefore art thou: Original problem code changed so the solutions don't match

Hi there! New learner here. The original problem (https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/wherefore-art-thou) changed slightly from the 3 published solutions (freeCodeCamp Challenge Guide: Wherefore art thou) which is a bit confusing for a new learner.

Each solution requires changing the first var (var arr = [];) and the last return (return arr;) but the instructions on the original problem do not want learners to touch the var arr or the return. The 3 solutions offered wouldn’t work if I placed them in between the lines of code as instructed.

2 Likes

yeah i kinda had a hard time here, the new ones suggests us to push the answer to arr, it’s true that solutions are outdated but are still inspiring

i think the first one would be pretty good

1 Like

I agree with @danzel-py – I also like the first option.

1 Like