Skip to content

TypeError in superFunction() #1

@ygautomo

Description

@ygautomo

Hi Ben.

I've tried this command

// pass functions as arguments to other functions
const superFunction = (fn, a, b) => fn(a,b);

console.log(superFunction(multFunction,2,5));

I'm selecting superFunction to run, and I found an error:
TypeError: fn is not a function

Do you have explanation about this ?

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