Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing function keyword in code snippet. #185

Closed
mutalis opened this issue Jun 5, 2019 · 2 comments
Closed

Missing function keyword in code snippet. #185

mutalis opened this issue Jun 5, 2019 · 2 comments

Comments

@mutalis
Copy link

mutalis commented Jun 5, 2019

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}!`
        );
    }
}
@protoEvangelion
Copy link

There is a PR open for this: #158

@getify
Copy link
Owner

getify commented Aug 31, 2019

dupe.

@getify getify closed this as completed Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants