SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function addTogether(a, b) {
  2.   if(!Number.isInteger(a)) {
  3.     return undefined
  4.   }
  5.   if (b === undefined) {
  6.  
  7.     return function(b) {
  8.       if(!Number.isInteger(b)){
  9.         return undefined
  10.       }
  11.       return a + b
  12.     }
  13.   } else if (!Number.isInteger(b)) {
  14.     return undefined
  15.   }
  16.   return a + b
  17. }
  18. addTogether(2,3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top