Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Yep, that should work. :]
Gotcha, I changed it to assert.closeTo with a delta of 0.01 (1 percentage point), I would think that would be large enough to capture other correct calculation orders.
Now the issue is that people that do calculations in a different order than the reference solution may fail tests when they shouldn't ( even fixed tests might be affected ). Testing should be done with
assert.approximately
instead ofassert.equal
( or, in both cases, an equivalent ).This is documented, but the whole subject is a wasps' nest.
Changed from strings to floating point.
Fixed, thank you for catching that!
This comment is hidden because it contains spoiler information about the solution
Does this help? https://stackoverflow.com/questions/33660518/why-can-functions-be-called-without-parentheses-when-using-template-strings
Thanks!
because the list is an array so we need to iterate over the array. we can't just pass list to Math.min() as an array so we need the spread operator (...) to ensure that the Math.min() function goes over every element on the list to get the smallest value (min). Hope this helps.
I know what the "..." stands for before list, but why is it necessary?