Skip to content

Missing function keyword in code snippet. #185

@mutalis

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

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