Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    Ok, I'll fix it, I didn't understand the first request. Thanks for the help and clarification.

  • Custom User Avatar

    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.

  • Custom User Avatar

    newbies

    Newbies especially should be taught correct facts, not types of your own invention.

  • Custom User Avatar

    "Duplicate" does not mean "exactly the same".

    The idea behind the kata is the same; exact implementation does not make it not a duplicate. A different input or output encoding would not make it not a duplicate either.

    So no, inventing your own types does not make this kata not a duplicate either.

  • Custom User Avatar

    It can be an explicit type, but that should be specified instead of just shown in an example.

    This is well documented. You don't have to agree, but you will have to comply; every description of every kata is subject to this quality standard.

  • Custom User Avatar

    Yes, NaN is a Number. See IEEE 754, which defines the number type JS ( and therefore TS ) uses.

    I know it's counterintuitive.

  • Custom User Avatar

    That's as clear as it can be. Test cases shouldn't print stuff to console. Console should be used only by user for debugging purposes.

    Unless you're using it for visualization and similar stuff, you don't need to print failed test cases to the console. Use the message field from the assertion library instead.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    And Not A Number is a number?

    just for it is a explicit case.
    Types show the expected types.

  • Custom User Avatar

    And Not A Number is a number?

    just for it is a explicit case.
    Types show the expected types.

  • Custom User Avatar

    Duplicate. This kata should have been a translation, not a new one.

    Inventing your own types does not warrant a new kata; expected values should have been correct native JS types anyway ( with the exception of null; you're correct there, but existing kata should be correct there as well ).

  • Custom User Avatar

    The custom assert prints to the console. Do not print to the console. Especially do not print ANSI-sequences to the console; it doesn't render as intended.

  • Loading more items...