Skip to content
Advertisement

Multiply (a)(b) function possible?

I have an oddball of a question from a code quiz. They expect me to write a function that multiplies (a) and (b) but instead of writing it like:

JavaScript

They expect me to do the math with:

JavaScript

Is it possible ?

Advertisement

Answer

Make a function that returns another function.

JavaScript
Advertisement