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.
U return a string instead of a number.
Thanks for the support, Sus. Hope you are able to implement something similar in your own solution. Feel free to message me if you need any guidance.
Thanks scf for the heads up; the Python translation should also be edited now :)
I just saw that "hoe" is still in the python test case, in case you might want to edit it there as well.
You're probably both interested in this. Note that working with GitHub pages is easier if you know
git
, but you can learn both at the same time.parseInt
is meant for strings, not for numbers. Sure,parseInt(12.5)
will return12
, but that's since it transforms12.5
to a string (internally). UseMath.floor
to get the next integral number (towards negative infinity).assertEquals
, which uses===
. The triple equality operator not only checks whether two values are the same, but also whether their types coincide (try12 === "12"
).,
. Keep in mind that,
in "Expected<xxx>
," isn't part of the expected value. That won't be an issue if you fix #2 above, though.By the way, if you don't get answers on questions, feel free to ask on gitter. Also, make sure to use GitHub flavored Markdown to make your code easier to read.
Thanks @bkaes, it's a good idea, I will try it later ;-)
you can post the solution below and mark it as a spoiler then someone who has completed this kata before can review your code and point you in the right direction
@myjinxin2015: You can also create a GitHub page that contains links to all your katas. While that's not part of Codewars itself, it gives you a way to bundle all your katas in an easier way than to change every kata whenever you publish a new challenge.
I'm glad my Kata can help you ;-)
You can click the kata icon on the left to enter the kata list. And then search for the keyword "training JS", which is the most convenient way I can think of.
Many thanks for your contribution; the image has been replaced and the test cases edited.
Feel free to let me know if there are any other issues :D
Here's the link to the picture I included in the Kata if you wish to censor it: When I miss few days of gym
And here's my email address if you want to send the edited version to me so I can edit the Kata: dleung@connect.kellettschool.com
Hello sus111,
Apologies, I had no idea what that word meant so I overlooked it. If more people find it offensive I may remove the picture as the instructions alone should be sufficiently clear for a user to understand the task and complete the Kata.
Thank you for your feedback.
Cheers,
donaldsebleung