Guest User

Untitled

a guest
May 21st, 2018
82
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=0; ) {
  8.     console.log("Fizz");
  9.   }
  10.  
  11.   // otherwise, write just the number
  12.   else { console.log(+ i); }
  13. }
Add Comment
Please, Sign In to add comment