0
I'm not getting output can anyone help.?
const multiply = (num) => { return x => num * x; } const double = multiply (2); const triple = multiply (3); double (5); triple (5);
6 Answers
+ 3
Because you didn't write the output like:
console.log(triple(5));
And don't use reserved words as variables.
In this case, neither parentheses nor "return" are needed:
const multiply = num => x => num * x;
+ 3
What exactly did you try?
console.log(triple(5));
+ 2
console.log(double(5));
console.log(triple(5));
+ 1
You forgot to console.log() the results
+ 1
Traid but shows error. function of anonymous
+ 1
Ty both of you it works..đ