Question: Using JavaScript functional programming, you can create functions that create new functions with different properties. Please see the question below. Example: A function that returns
Using JavaScript functional programming, you can create functions that create new functions with different properties. Please see the question below.
Example:
A function that returns a function to test if a number is greater than a given number.
function greaterThan n
return function m
return m n;
;
To use the above function :
var greaterThan greaterThan; is this correct? What is the
purpose of this line?
console.loggreaterThan;
Output: true
Thanks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
