Last quiz on Intermediate Algorithm Scripting (Arguments Optional)

Last quiz on Intermediate Algorithm Scripting (Arguments Optional)
0

#1

Hi, Good morning every one.
I have here 2 issues:
-The first I can’t understand what is meaning of return function if there only number as parameter? Is this function must generate random number to sum it with the parameter in other words why sumTwoAnd(3) returns 5?
-The second issue this is my first time to see parameters like this addTogether(2)(3) should return 5! This possible?


#2

Take a look at closures and everything will make much more sense when you start to realize what closures are.


https://www.youtube.com/watch?v=-jysK0nlz7A (Be careful that this is using a library but still demostrates closures)