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);

7th Jan 2022, 5:32 PM
Nikhil
Nikhil - avatar
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;
7th Jan 2022, 5:44 PM
Solo
Solo - avatar
+ 3
What exactly did you try? console.log(triple(5));
7th Jan 2022, 5:51 PM
Lisa
Lisa - avatar
+ 2
console.log(double(5)); console.log(triple(5));
9th Jan 2022, 9:17 AM
Attique ur rehman
Attique ur rehman - avatar
+ 1
You forgot to console.log() the results
7th Jan 2022, 5:43 PM
Lisa
Lisa - avatar
+ 1
Traid but shows error. function of anonymous
7th Jan 2022, 5:50 PM
Nikhil
Nikhil - avatar
+ 1
Ty both of you it works..🙂
7th Jan 2022, 5:54 PM
Nikhil
Nikhil - avatar