Skip to content

TypeError in superFunction() #1

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 ?

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