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.
This comment is hidden because it contains spoiler information about the solution
done o7
Since you're using lodash, you should use
_.sample(arr)
instead of things likeingredients[random(0, ingredients.length - 1)]
Added some basic tests for your first 2 recs, and some advanced tests based on your third (a few different usages of units as substrings)
Thanks! Let me know if you spot any other cases that should be tested
Hi,
Some fixed and sample tests are missing:
"8 oz. vanilla bean pods"
TEASPOON
"lojjtbsp 2 2/3 tbsp."
=> should also be testedCheers
Working on fixing up & adding some tests to JS, have some questions for you.
Updated those - thanks for pointing that out! I've turned the examples language-agnostic and added that space.
(That spacing was a leftover from a previous much more complicated version of this kata)
Description should be language-agnostic (Removal of function name and replaced with a more generalized explanation for the examples) , since in future this kata might get translated into other languages, which may have different naming conventions for functions
However, this is not the case for the 1st example given
Updated, somehow those didn't get copied over / saved. Should be there now
Thanks for the catch! Fixed π
In your kata's description, you have a typo in the examples section. You currently show "[1, 2, 3, 4] => Median 3.5 LQ 1.5 UQ 3.5". The Median should be "2.5", not "3.5".
There is no example tests. Are example tests also not there in the JS translation?
Translation for TypeScript - basically a copy/paste of JS version with the types added
Because I missed those while removing console.logs before publishing π€¦ββοΈ
Fixed, thanks for the catch
Typescript translation - copied JS, added type annotations
Loading more items...