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.
1.0 has been enabled so I am goingto reject the forks
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Needs fixes for method accessor - methods that are merely accessed but not called should not be saved into the history array.
merged to node v18 and approved
I discussed this with some mods, and the resulting opinion is that this is not a great idea. I like the motivation behind it, however it adds a fair bit of complexity which:
sleep
in Python)So I am gonna reject this, sorry.
Try poking around the runtime environment.
The sample tests are just the template, there should be actual sample tests.
This comment is hidden because it contains spoiler information about the solution
Please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
I think a chance for Math.random() to be 0 is exceptionally rare though (maybe 1 in a billion) but changed it to your suggestion nonetheless. I also make the test cases more semantic and more conforming to the ES6 standard.
It is theoretically possible for
Math.random
to return0
. ( I did some checking, and I have yet to see it do so, but it is documented it might happen. )let len = Math.ceil(Math.random() * 30);
should belet len = Math.floor(Math.random() * 30) + 1;
In CW JS, the test suite is in a closure that is wholly, completely, absolutely inaccessible to user code ( in other languages, this may be different ). There is no need for names like
gen_fcw34gvw34gw
, they only distract.I changed back to the original author's solution with 2 space indents.
But CW republishes the example solution with a new date if it's changed, so sorting by
Oldest
will no longer work to find author's solution. It does not republish it if it isn't changed.Please don't change the example solution at all ( unless it fails updated tests ).
Note: Example solution is what I call authors's solution in
Solution
, reference solution is what I call author's solution inSubmit Tests
. They can be different ( it actually has advantages if they are ).Loading more items...