I dont understand how this function returns 6. I was going to explain the part I don't understand and could not put it into words. I would really appreciate a simple explanation.
var add = function(a) {
return function(b){
return a + b;
}
};
var addToFive = add(5);
console.log(addToFive(1));