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.
This comment is hidden because it contains spoiler information about the solution
Seeing the description and the tests, what other possibility other than strings there is?
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.
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.
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
toJSON.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.
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 ヽ༼ຈل͜ຈ༽ノThe fact that I jumped through a hoop does not mean the task works as a kata.
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 asmystery(2)
, so I see no added value, only subtracted value: more work for a worse result.You solved it, so something works.
Sorry, I don't see how I did that.
I just don't get it. (I created the JS translation)
( JS )
You've reinvented
JSON.stringify
, but worse, because the difference betweenString
"2"
andNumber
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.
Sounds like you fixed it. ( ͡ᵔ ͜ʖ ͡ᵔ )
It should be more clear now, as it should be in the same order as cpecified in the object. (. ❛ ᴗ ❛.)
\(^_^ )
JS translation kumited. ( ͡° ͜ʖ ͡°)
Loading more items...