Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
takano32 committed Mar 28, 2012
0 parents commit 961b8e3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.rst
@@ -0,0 +1,6 @@
====================
Fizz Buzz in Node.js
====================



20 changes: 20 additions & 0 deletions fb.js
@@ -0,0 +1,20 @@

f = "Fizz";
b = "Buzz";

function fb(n) {
if (n == 0) return;
fb(n - 1);
if (n % 15 == 0) {
console.log(f + b);
} else if (n % 5 == 0) {
console.log(b);
} else if (n % 3 == 0) {
console.log(f);
} else {
console.log(n);
}
}

fb(100);

0 comments on commit 961b8e3

Please sign in to comment.