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.
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.
It said you were wrong because you are expected to return a value, not print to console.
Can you suggest better wording? I'm open to fixing it.
Great idea, but garbage description, spent a solid 10 minutes trying to figure out what was going on.
No offense taken, now that you solved it, do you have a suggestion about how would it be clearer?
I was able to figure it out eventually. I mean no offense, it's just not clear when you first read it and look at the examples. But I completed it.
What's the difference between 3 for the price of 2 and buy 3, pay 2 get 1 free? The examples are clear imho. For every 3 mangoes you buy, you only pay 2 and get 1 free.
@Chrono79 It's just generally confusing and not well explained. I would consider re-writing the entire desription and making the examples more clearly match the description. It is still confusing.
Like, is it 3 for the price of 2, or are there free mangoes involved or what? It's just too vague.
Scala translation
Scala translation
Scala translation
small world Just was chatting with you last week ;p
Not anymore.
TypeError: Test.deepEqual is not a function
at Context. (test.js:34:6)
at process.processImmediate (node:internal/timers:471:21)
Approved.
Loading more items...