The test for the 'multiply' function used array brackets [] for the input parameters, which caused the test to return an error when rest parameters (...args) are used in the function, like so:
const multiply = function(...args){
return args.reduce((acc, cur) => acc * cur);
}
The previous solution removed numbers entirely, whereas this one treats
them like letters and checks if they are evenly spaced.
More importantly, the old solution test seemed to check if the numbers
were palindromic, but because the solution replaced them with "", it
wasn't testing what it seemed to.
I added a new test to differentiate between the palindromic "rac3e3car"
and the non-palindromic "r3ace3car".
These changes also obviate the problems raised in Issue #355.
The previous solution removed numbers entirely, whereas this one treats
them like letters and checks if they are evenly spaced.
More importantly, the old solution test seemed to check if the numbers
were palindromic, but because the solution replaced them with "", it
wasn't testing what it seemed to.
I added a new test to differentiate between the palindromic "rac3e3car"
and the non-palindromic "r3ace3car".
Previous Fibonacci solution didn't use arrays, and since this is an
array-heavy section, it seemed better to have that be the method here.
Also, it accounts for entering 0 as an argument without having to add
any extra code, which takes care of some currently open issues.
Issues #192 and #236 are about the same thing.
I added a test for that as well.
There's an idea I've been made aware of called undesirable difficulty in learning theory. The idea is that sometimes obstacles are put in place that take the focus off learning a specific thing by introducing a challenge on a thing that might be related but not critical to the task at hand.
In this exercise, I notice pretty much everyone reaches for the splice method and I suspect it is because of the language in the prompt. Specifically: "removes the other arguments from that array"
I've added a hint that I think would not take away from the challenge but give learners an alternative way to think about the exercise.
* PR Template: Flip order of checklist and details
Because:
If the details are first, they are viewable in Discord's webhook.
This PR:
* Moves the detail sections to the beginning of the template
* Moves the checklist section to the end of the template
* Adds an issue section to link the issue
* Adds the Because, This PR, and Issue sections to checklist
* Reduce wording that is not essential