Den356 Posted May 31, 2020 Share Posted May 31, 2020 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 More sharing options...
Ingolme Posted May 31, 2020 Share Posted May 31, 2020 The variable "func" is being used as a function in the body. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now