function add (x) {
return function (y) {
return x + y;
};
}
var add5 = add(5);
var no8 = add5(3);
alert(no8); // Returns 8
Can someone please explain me what happens whit y? How does first call of the function add returns 5? Does it ignore y or what?