Advertisement
ilianrusev

Untitled

Feb 18th, 2022
11
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function foo(n) {
  2. let temp = 0
  3.  
  4. function recursive(x) {
  5. temp += x
  6.  
  7. return recursive
  8. }
  9. recursive.toString = () => temp
  10. return recursive(n)
  11. }
Advertisement
RAW Paste Data Copied
Advertisement