Closed mutalis closed 5 years ago
Missing function keyword in snippet code at: https://github.com/getify/Functional-Light-JS/blob/master/manuscript/ch7.md/#behavior-too
function person(name,age) { return happyBirthday(){ age++; console.log( `Happy ${age}th Birthday, ${name}!` ); } }
It should be:
function person(name,age) { return function happyBirthday(){ age++; console.log( `Happy ${age}th Birthday, ${name}!` ); } }
There is a PR open for this: https://github.com/getify/Functional-Light-JS/pull/158
dupe.
Missing function keyword in snippet code at: https://github.com/getify/Functional-Light-JS/blob/master/manuscript/ch7.md/#behavior-too
It should be: