Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript
<script>
              function negate(func)
              {
                  return function()
                  {
                      console.log(arguments);
                      return !func.apply(null,arguments);
                  }
              }
              var isNotaNmber= negate(isNaN);
              document.write(isNotaNmber(["1000",332,"iioi"]));

          </script>

this is showing only one value false. But i guess apply method should apply three times and it needs to return me three boolean operation. but i dont know why its showing me only one boolean operatoin 'False'
Posted

1 solution

At the end of all the mess you have what you do is calling isNaN with an array (["1000",332,"iioi"]). For sure it's not a number - it's an array...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900