Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Thanks so much for the explanation! Translation approved :)

  • Custom User Avatar

    Great :) but I'm not familiar with PHP. Do I (as the original author) need to accept, or should I leave this to someone else?

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    You're right, I only just realised that toString() was a bad choice for a function name. But if I change it now, won't it cause solutions that other people have submitted in the past to fail?

  • Custom User Avatar

    Hey, thanks :)
    I've been using !!a lot recently - it's just a nice short alternative to writing out === true

  • Custom User Avatar

    Ok, I've made some small changes so that it should now be ok (would be really grateful for any more feedbak!)

    The changes mean that a series of 4 asterisks will return < strong>< /strong> (i.e. empty HTML tags)

    I checked the behaviour against this markdown previewer

  • Custom User Avatar

    Yes, there's a reason. In my experience Codewars handles HTML kind of weirdly and the tests don't work as you'd expect, so I added in the extra space in order to escape that. I'll write a note about it in the description of the Kata.

  • Custom User Avatar

    Hey, thanks for the feedback, I'll check it out and get back to you (ignore my last comment if you saw it, made no sense!)

  • Custom User Avatar

    Hey there,
    I worked on this for a really long time and it was good fun but now I'm failing on just a few of the random tests. I'm passing around 45/50. And I have no idea what the problem is, as my answer is exactly the same as the expected outcome.

    Error message is like this:

    Valid outputs: 'ten billion five hundred fifteen million eight hundred fifty thousand three hundred eighty seven' or 'ten billion five hundred and fifteen million eight hundred and fifty thousand three hundred and eighty-seven' - Expected: ten billion five hundred and fifteen million eight hundred and fifty thousand three hundred and eighty-seven, instead got: ten billion five hundred fifteen million eight hundred fifty thousand three hundred eighty seven

    Could anyone help out?

  • Custom User Avatar

    Thanks for replying, had another go this evening and figured it out for myself! (but you were right, I was returning the wrong thing)

  • Custom User Avatar

    Hello,

    Whatever I seem to do I get this error message:

    "TypeError: Object o has no method 'toLowerCase'"

    Even when I don't use the 'toLowerCase' method.

    Can anyone help?

  • Custom User Avatar

    Hey! I'm pretty new to this and worked so hard on this one. My code seems to work fine but I can't get past the tests. I get this error message on the third test:
    "Check valid output when handling the apostrophe ’ - Expected:
    shouldn’t

    , instead got:
    shouldn’t"

    I wondered whether it's possible Codewars is handling the html that's part of the task weirldy? Or should I keep trying?