Guest User

Untitled

a guest
Sep 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. const until = 100;
  2. let i = 0;
  3.  
  4. function fizzBuzz(n) {
  5. let t = '';
  6. if (!(n % 3)) t += 'Fizz';
  7. if (!(n % 5)) t += 'Buzz';
  8. return t || n;
  9. }
  10.  
  11. while (i <= until) {
  12. console.log(fizzBuzz(i++));
  13. }
Add Comment
Please, Sign In to add comment