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.
I tried this but it says it's wrong
Approved.
Improves organization and feedback of failing tests.
This comment is hidden because it contains spoiler information about the solution
PowerShell translation
PowerShell translation
Fixed.
this is easier than i first thought :)
This comment is hidden because it contains spoiler information about the solution
The general structure of a Codewars problem is that the tests call your function with dfferent inputs and check that it returns the correct value.
This is for consistency (it would be bad UX if some Kata expected you to write to console, and others expected you to return a value, etc. The reason for this being the chosen format is that most langauges unit-testing libraries are structured like this, making test writing for most of them easier.
Read the instructions carefully, it says return, not print
This comment is hidden because it contains spoiler information about the solution
Nice cata. Simply and pretty short on JS. Also remmeber me to use ternary)
Great kata. The examples really helped cement what the description was asking. Makes me want to check if real supermarkets honor their "buy 2, get 1 free!"
Approved!
Loading more items...