We have a function:
function f (a, b, c) {
function sum (a, b) {
return a + b;
}
}
Rewrite it as follows:
- If arguments a and b not transfered, they're equals by default 2 and 3.
- If argument c transfered and is a function, then it will run after the function sum called.
- Function f must return the result of a function argument c,if it exist,or result of a function sum.