Guest User

Untitled

a guest
Aug 17th, 2019
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Adder
  2.  
  3. const createAdder = a => {
  4. return b => {
  5. return a + b;
  6. };
  7. };
  8.  
  9. const add10 = createAdder(10);
  10. console.log(add10(-2)); // turns into 8
  11. console.log(add10(20)); // turns into 30
RAW Paste Data