Skip to content

Missing function keyword in code snippet. #185

Description

@mutalis

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}!`
        );
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions