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.
🙏🙏🙏
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.
Use spoiler flag next time please.
This comment is hidden because it contains spoiler information about the solution
wouldnt this return floating point numbers on division and fail the test, or am i missing something?
Note that this code would not work in a strict mode environment. This is not considered a best practice.
Otherwise, clever idea