Skip to content

Commit ae81c42

Browse files
committed
first commit
0 parents  commit ae81c42

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fizzBuzz.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function fizzBuzz(num) {
2+
for(var i = 1; i <= num; i++) {
3+
if(i%15 === 0) console.log('FizzBuzz');
4+
else if(i%3 === 0) console.log('Fizz');
5+
else if(i%5 === 0) console.log('Buzz');
6+
else console.log(i);
7+
}
8+
}
9+
10+
fizzBuzz(20);

0 commit comments

Comments
 (0)