Advertisement
ilianrusev

Untitled

Feb 18th, 2022
11
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getFibonator() {
  2. let n1=0;
  3. let n2=1;
  4.  
  5. function getNumber(){
  6. let nextNumber = n1 + n2;
  7.  
  8. n1 = n2;
  9. n2 = nextNumber;
  10. return n1;
  11. }
  12.  
  13. return getNumber;
  14. }
Advertisement
RAW Paste Data Copied
Advertisement