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.
Floats can create big problems, so it's in our docs to avoid them whenever possible, regardless of your rationale about a legacy system, which wasn't stated in the description. If you must simulate a legacy environment, I strongly suggest finding another angle to do it on that won't cause difficulties in translation and unpredictably failing assertions.
See:
Thanks for the contribution. I used the template provided by codewars, I was surprised by the bug with assert, but I already applied the suggested fix.
As for the applied notation, it was built with the aim of simulating a real environment. Where we need to maintain the standardization of a legacy system.
Thanks for the contribution. I included random tests
There are no random tests. See https://docs.codewars.com/authoring/guidelines/submission-tests#random-tests
A few issues:
assert
isn't defined. After importing it, diffs print poorly due to truncation. I suggest adding:const newPrice = ...
becausenewPrice
is inexplicably defined in the preloaded. I'd suggest removing this."new-price"
, I'd suggest a camel cased key:"newPrice"
, which is more idiomatic for JS, allowing natural dot notation access.