Jump to content

What is the parameters in arroy function?


Den356

Recommended Posts

Hello everyone,

please help the newbie figure it out.

There is such a JS code.

function makeDouble (x) {

return x * 2; }

var doMath = (x, func) => func(x + 5);
var num = 5;

The task is this:
Using only makeDouble, doMath, and num, make the value of num equal to 20.

num = _____________________________________________________

I can’t understand why there are two parameters in the arrow function, but in the body of this function itself there is only one parameter. What am I doing wrong?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...