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.
Implicit returns in arrow functions are dependant on the lack of a body block, not being one-line.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Function_body
Also arrow functions context differ from regular function expressions and declerations. They follow Lexical scope. I recomend reasearching this difference and when it is better to use an arrow funciton over other ways of writing it. It makes a difference when using the 'this' key word.
the most common use is just to make things shorter. Arrow functions automatically return without specifying 'return' if the function is on one line.
Not an issue
that notation is for ECMAScript 6. We should all use it.
Please forgive my strange thoughts, I just want to know what your agent have stolen ;-)
I agree, I've enjoyed all of your kata's but this one. Decrypting was challenging, but do-able; getting stuck on Answer1, Answer 2, Answer 3 thing was very frustrating. Your updated explanation just confused me more for a long time.
It's "There is no portal here ... sending you back to Aha!". I guess you should write feature requests on Github now
This comment is hidden because it contains spoiler information about the solution
There's no published list, but you can vote to request one on the Codewars ideas portal here. Sign up is instant once you put in your email and name. I listed the privileges that I am aware of over there, up to 3000 honor.
Don't forget to vote!
This comment is hidden because it contains spoiler information about the solution
In fact, the user needs to do is just the first part: the correct decoding. The second part (three questions) is just an interesting joke, and users only need to honestly answer what they see and don't need any code.
My Kata does not require users to use regular expressions to solve this kata.
In fact, beginners can solve it with for..loop
const
is short for constant, which means it will never change. Under normal circumtances, functions can be redefined later, butconst
cannot.As for performance, it depends on the execution engine. If the Javascript is being compiled (as happens on many browsers nowadays), then
const
can be faster than the standardvar
, since the compiler can optimize on the content ofconst
never changing. That being said, you'd probably need a ridiculous Javascript app to actually see the performance benefits, slight as they are.is there any difference between them?
no, it's not