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.
Yes, and for that, I show and explain in description that 1 job in the kata, is diff between a normal number, and a NaN, and return an explicit case type for it.
Ok, I'll fix it, I didn't understand the first request. Thanks for the help and clarification.
The idea is too to diff between typeof and instanceof, nor just "return Array.isArray(value) ? Array.isArray(value) : typeof value"
And between a literal object, or other objects that have inheritance with Object, but have their own constructor.
Too to show that a NaN is a typeof number, when is a "Not a Number" explicit name description.
Neither NaN, Array, Null, contructor Objects/classes, are my own types. They are explicit js/ts types that are not typeof básics.
How I told you, maybe I missexplained the kata, my English is not the better, but the idea es that a newbie can diff between typeof and others, nor just an array/null from other kind of objects, and that they start to fight or probe with other kind of instances, with something more basic that generic types.
Its more..... Look your link.... do you think this kata is the same... really do you think is the same?
It this "duplicate" kata, diff between objects created with constructors, or just with literals or just Objects classes?
It diff between null, or NaN?
Maybe can you explain me better what do you expect. But i think the description is easy to understand. It's possible I missexplain correctly.
Or maybe you expect I complex the kata setting for types like Date, RegExps, Errors, Enums...
Enums is not a native js literal too... but is a ts creation type.
Then is not duplicate, either right now, or either if I complex it, then maybe a 6kyu kata.
Please, reply me exactly, I dont understand you properly.
I dont know if you are showing me an error, or maybe the testcase logs dont show as expected.
Maybe I have errors, but when I tests cases in the post kata, I look it as I where expected.
Maybe you can show me or explain me to fix that you are looking bad and show It in the best case.
Array is my own type?
classObject and an implicit object are the same?
Null is an object or is just a typeof object?
is Not a Number (NaN) like a number?
That are abstract types... ask it for isNaN(value) ... or a NaN === NaN is it?
I Could complex it, with enums, dates, regexp, or other basic types... I think I abstract so low types for basic, for a easy kata.
Or you just quest about native js types? Cause this kata isn't for native literals.
Maybe people who is working with js everylife knows it, but newbies, arent.
And Not A Number is a number?
just for it is a explicit case.
Types show the expected types.
And Not A Number is a number?
just for it is a explicit case.
Types show the expected types.
I were permuted the table and It muted the original array.
Solved, ty :)!
This comment is hidden because it contains spoiler information about the solution
Im afraid with this ternary
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I did it, but I dont think the kata is for 6kyu in Ts.
Maybe im dumb... but I pass more than 100 tests, but everytime I fail some randoms... like that
For example some random tests results... ->
Log
{
coordinates: [ 1, 1 ],
steps: 2
}
expected 10 to equal 9
or like that
Log
{
coordinates: [ 2, 2 ],
steps: 2
}
expected 5 to equal +0
And every try the same, ridiculus bad tests, or Im crazy or I dont know.
In that 2 examples. Doing as my self...
1 - Start in position 1,1 with 2 steps... 1 step going down, other going right -> 10 food... the test expect 9???
2 - Position 2,2...with 2 steps... 1 step going up, other left... nothing more... 5 food... the test expect 0???
I could show more and more random tests fail examples.
Maybe Im so tired and I understand nothing. If somebody could help or tell me what are failing? Or simply somebody could fix that? Ty
Loading more items...