Guest User

Untitled

a guest
May 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Write a statement that decides if the variable `i` is divisible by 3.  
  2.  
  3. // for the numbers 1 through 20,
  4. for ( i=1; i<=20; i++) {
  5.  
  6.   // if the number is divisible by 3, write "Fizz"
  7.   if ( i=3; ) {
  8.     console.log("Fizz");
  9.   }
  10.  
  11.   // otherwise, write just the number
  12.   else {
  13.     console.log(+ i);
  14.    
  15.   }
  16. }
Add Comment
Please, Sign In to add comment