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 problem itself being setup for multiple languages makes no mention of JavaScript "Numbers" but instead only "integers".
In javascript, the
Number
,BigInt
orBoolean
primitives may be used to represent what we consider an integer.I don't see the justification of why the
Number
primitive ought to be the only acceptable way to represent a mathematical integer.I think that the test case of "
[ [ true ] ]
should return false", should be omitted from the tests as it's ambigious, and would require deeper context.I think some others have noted this here, but for Javascript there is a test case of [ [true] ] which is dissallowed. Booleans are typically considered a special case of
number
, and behave as such in JS (i.e.,5 + true == 6
). It seems that[ [ true ] ]
should be true as a best practice as the trivial sudoku of 1x1 can only have one value1
which is best represented by a boolean.