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.
var basically stands for variable; its value can change within the script, as such when hoisting, js will look for another value that me a variable to the same. const basically stands for "constant" as such, the value is fixed. For a short function as such, the value can be fixed!
I see there's a Javascript version of this kata, so this suggestion is resolved.
can you please share your code and mark it as spoiler? I know more JS now
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator
During the replace the function is taking the vowel and adding it to the string k before replacing it.
just refresh the page
Very nice link, just forwarded to my colleagues and trainees: thanks flame!
There are advantages in using
const
in this scenario. For example, because a compiler knows thatconst
variables do not change, it can perform certain optimizations before running the code. The same does not happen withvar
, since a change is expected at all times. I highly suggest reading this aritcle in StackOverflow for more information, I personally found it very enlightning: http://stackoverflow.com/questions/21237105/const-in-javascript-when-to-use-it-and-is-it-necessaryтолько const, только хардкор.
Some one helped me with the translation, hope I can get it fixed in two weeks from now since I'm on vacation. Sorry for the inconveniences :)
Marking issue as resolved as the description has now been updated as requested. Thanks again for the feedback.
This comment is hidden because it contains spoiler information about the solution