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.
for JavaScript doesn't work for any response of the function except for throwing errors for test case:
Test.expectError("Incorrect hex-string length", function(){getReversedColor("1234567")});
returning false, returning nothing, NaN, undefined, 0 etc. still causes test error.
Throwing errors is not considered a common practice in JavaScript, so I strongly suggest either change the ourcome expectation for invalid inputs, or mention this in the description clearly.
As for now description only includes Java and Haskell:
"If the entered string is incorrect: length is 7+, has non-hexadecimal characters or non-string type, then the Error(IllegalArgumentException - Java) should be raised/thrown or Nothing should be returned in Haskell."