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.
you're just misinterpreting your printed output, codewars doesn't have its own implementation of java, that would be insane.
This comment is hidden because it contains spoiler information about the solution
🙏🙏🙏
Here is the explain to everyone about the
function plus(n) { return function (a) { return a + n } }
Let's say we need to do something like two(plus(three()))
I.The javascript is running from the inside 1st right?
then it will try to calculate three() meaning 3 , there is nothing hard here
II.now to the plus(three())
if u trying to console.log(plus(three())), u will see it return
and nothing is calculated.
or i can say
III. Remember two(something_in_here) function? it
or i can say
To summarize all from 1-> 3, we have everything explained below
==> this mean 2 has been assigned to a!
So that' how.
let me show u why:
"This-i mean all of this-will be my string" => "hisTay-iay eanmay llaay foay histay-illway ebay ymay tringsay"