SHARE
TWEET

Untitled

a guest Jun 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let a=0;
  2. let b=1;
  3. let f=0;
  4.  
  5.  
  6.  
  7. for (let n=0; n<50; n++) {
  8.  
  9.   switch(n) {
  10.     case 0: f=0; break;
  11.     case 1: f=1; break;
  12.     default: {
  13.       f=a+b;
  14.       a=b;
  15.       b=f;
  16.  
  17.     }  
  18.   }
  19.  
  20.   console.log("n="+n+" f="+f);      
  21. }
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