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.
@jake.backues@gmail.com
It's called the (fat) arrow function, it's just a bit of syntactical sugar to represent
function() {}
in ES2015.For example:
.map(v => CHAR_TO_MORSE[v] || v)
in ES2015 is the equivalent of:
.map(function(v) { return CHAR_TO_MORSE[v] || v })
See here for more information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
This comment is hidden because it contains spoiler information about the solution
Pretty sure it's broken.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Damn, I was just missing the Object prototype override, well done!
Hi, I've added a CoffeeScript translation, if you want to approve it, instructions for the approval process are here.
Maybe it is worth calling out 'y' is not a vowel in the description.
I generally consider 'y' to be a consonant, but if it is going to confuse some people, it's perhaps better to be more explicit about it.
Hi, I've added a CoffeeScript translation, if you want to approve it, instructions for the approval process are here.
Added examples to description.
Thanks for the hint on array ranges - I'm trying to learn CS by translating some of the easier katas here, and didn't know about the range feature. I've rewritten that part as per your recommendation too.
Thanks for all the feedback.
I'm pretty sure there's no difference writing multiple vars or one var with comma separated variable names (if that's what you're referring to).
I think it's purely a stylistic choice.
Also vars inside for loops etc. are hoisted to the top of the function scope anyway, so it doesn't matter where you declare them. Again, stylistic choice.
Yeah I have been, been manually cleaning up and tweaking the output, so it's not 100% low effort stuff, but I clearly missed that :)
I've fixed it up, thanks for the heads up. I'll keep this in mind for any future work.
Hah, didn't notice that on the history :)
I've fixed up the translation, thanks.
Can use
\W
instead of^\w
to match non-word characters, in case you didn't know :)Hi, I've added a CoffeeScript translation, if you want to approve it, instructions for the approval process are here.
Loading more items...