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.
added all 3 to JavaScript
I agree. I thought the terse nature of the task made it super fun, but the
can
part was genuinely the only part that felt like it was an afterthought. Don't get me wrong, I found it fun to work around it, but it isn't one that has a clean solution.@hpr that will only seem to work until it breaks terribly one day. JavaScript is a concurrent, non-blocking language. One script can modify a global variable just before or after another script was reading it. So you enter into all kinds of race condition headaches by sharing state with global variables.
Non-numeric inputs have been removed from JS version.
Moved reference solution function to the describe block scope, should be ok now
reference solution is fixed
This comment is hidden because it contains spoiler information about the solution
This does not confront to standards in 2023 ~!
oh, sorry, I didn't see that part of the description... 'x) (I just completed the kaata again in JS, in "TDD-only" mode). Let's remove that.
I don't see how any of this is an issue.
has
is instance basedwith
having
is... what it is (both instance and "hack" based. Both tested)... The setup of the kata is rather unfortunate, involving a lot of hacks.at most a suggestion, since it's more about adding specs than pointing an actual problem.
closing
added to JS
!
!
I think the word "having" is more natural in English sentences here so it's the only global intended to be used with
each
for that reason.Doing global references isn't bad practice if you back up the old values of the references and restore them afterward, which doesn't require that much more code in this case.
Loading more items...