Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Seeing the description and the tests, what other possibility other than strings there is?

  • Custom User Avatar

    PHP
    Write to description return type you want from this functions in tests. I done this but this guessing takes more time than main task.

  • Custom User Avatar

    I see now. Either @jkalasz can fix something (maybe), or this kata will get retired (expecting it fairly soon, as one more downvote will do it).

    At the moment, this function is not very mysterious at all.

  • Custom User Avatar

    The mystery return value for "2" is "2". For ( Number ) 2, it is "2". JSON.stringify does not have that information loss.

    That's worse. I'm comparing mystery to JSON.stringify here, and the latter is doing better. No?

    Not blaming you; my problem is with the whole concept of the kata. I don't know PHP; it may work there, I don't know, but I think it doesn't work in JS.

  • Custom User Avatar

    for a worse result.

    I still don't get it, sorry. But, now I see it's the same with PHP, I just transpiled it over.

    @jkalasz's fault I guess ヽ༼ຈل͜ຈ༽ノ

  • Custom User Avatar

    You solved it, so something works.

    The fact that I jumped through a hoop does not mean the task works as a kata.

  • Custom User Avatar

    What is the added value of the return value from this function over the return value of JSON.striongify(arguments) ?

    mystery("2") is supposed to give the same return value as mystery(2), so I see no added value, only subtracted value: more work for a worse result.

  • Custom User Avatar

    You solved it, so something works.

  • Custom User Avatar

    You've reinvented JSON.stringify

    Sorry, I don't see how I did that.

    the difference between String "2" and Number 2 gets lost - at the cost of additional, totally unnecessary complexity

    I just don't get it. (I created the JS translation)

  • Custom User Avatar

    ( JS )

    You've reinvented JSON.stringify, but worse, because the difference between String "2" and Number 2 gets lost - at the cost of additional, totally unnecessary complexity. I don't know if this kata works in PHP, but in JS, it doesn't.

    I don't know whether to label this an issue, a suggestion ( to unpublish ), a question ( what's the meaning of life, the universe and this kata? ) or not at all. So I won't.

  • Custom User Avatar

    Sounds like you fixed it. ( ͡ᵔ ͜ʖ ͡ᵔ )

  • Custom User Avatar

    It should be more clear now, as it should be in the same order as cpecified in the object. (. ❛ ᴗ ❛.)

  • Custom User Avatar

    \(^_^ )

  • Custom User Avatar

    JS translation kumited. ( ͡° ͜ʖ ͡°)

  • Loading more items...