Can someone please explain the steps this program takes and the order in which they are taken in order to produce the result “false”
function negate(func) {
return function(x) {
return !func(x);
};
}
var isNotNaN = negate(isNaN);
show(isNotNaN(NaN));
The end result is that you have a function that returns the opposite of the
isNaNfunction.Seems like overkill when you can just call
isNaNwith!yourself.