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.
This comment is hidden because it contains spoiler information about the solution
Yes I got this as well, although you may have solved it by now.
This means that your validation scheme is letting through a bad input.
Try console debugging to find what the bad value is.
Should implement some random tests. I am seeing hard-coded arrays in the solutions here.
ಠ_ಠ
Description shows incorrect parameter usage:
arr2bin(1,2,'a') == false
should be:
arr2bin([1,2,'a']) === false
The description should also specify the return value of an emtpy array should be
'0'
. Currently it says all non-numeric values should returnfalse
, which should includeundefined
, but the tests require otherwise...Hi, that was fast, but not quite was I was getting at.
The text is still the same as before, only now the test cases are randomly selected.
What I meant is that the text (sentence) should be randomly generated.
If you remove the 'const' keyword, and assign the global variable 'text' in the test fixture, then you can do this.
Use random numbers to select characters from a dictionary, building up 'words' of random lengths, building 'sentences' of random length, etc.
Any of those 'words' can be saved and inserted into the test cases.
This needs to have randomly generated test strings. I see too many solutions that are more or less hard coded for the example.
Glad to see that someone found a challenge here...
What's great about this kata is the wide variety of solutions that it inspires. Bravo.
The description needs to be clarified. The information presented is sufficient, however the sentence is long and worded confusingly.
There needs to be edge-case tests.
Tests should use "assertEquals" for numeric outputs, rather than "expect"
Nearly identical to an existing kata: http://www.codewars.com/kata/525481903700c1a1ff0000e1
Needs more test cases, including the edge cases mentioned in the description, and possibly randomly generated
This comment is hidden because it contains spoiler information about the solution
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
"To compare numbers instead of strings, the compare function can simply subtract b from a."
I got this initailly as well. Try reviewing the directions with regard to the bonus points criteria.
Loading more items...