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.
Awful ahaha!
This comment is hidden because it contains spoiler information about the solution
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!
After seeing how easily this could be acheived with 6 lines of code.... i am still happy with my attempt
This was embarrassing compared to others. But I am a N00b
Well i appreciate you taking the time
I've been coding about a week and wanted to solidify my learning. A friend suggested here
Your function's code has no
return
inside so your function is returningundefined
.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.
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'?
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.
This comment is hidden because it contains spoiler information about the solution