• Custom User Avatar

    Awful ahaha!

  • Custom User Avatar

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

  • Custom User Avatar

    Hi Guys,
    I'm pretty new to JS but have a few kata's under my belt now. I have an idea how to approach this but if anyone knows a resource or link that might help, please point me in the right direction
    Cheers!

  • Custom User Avatar

    After seeing how easily this could be acheived with 6 lines of code.... i am still happy with my attempt

  • Custom User Avatar

    This was embarrassing compared to others. But I am a N00b

  • Custom User Avatar

    Well i appreciate you taking the time

    I've been coding about a week and wanted to solidify my learning. A friend suggested here

  • Custom User Avatar

    Simple, remove the spaces from the string, then return the resultant string.

    Your function's code has no return inside so your function is returning undefined.
    console.log can be used to debug, but for almost all katas in Codewars, your function should return a value.
    If you're completely new to programming I suggest you try doing some free online course/s first because although there are beginner katas here, most assume you have a certain knowledge and won't explain the very basics.

  • Custom User Avatar

    Thanks, I appreaciate the feedback and have revised the code

    May be a stupid question but what do you mean by 'your function should return a string'?

  • Custom User Avatar

    Not a kata issue, it's a problem with your code, use Question label for cases like this.
    Don't use global vars (they keep their values between tests), and your function should return a string, don't write code outside your function, it won't run when your function is called.

  • Custom User Avatar

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