Skip to content
Open

lol #76

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions fizzbuzz.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@
'use strict';

var fizzbuzz = function (x) {
//
// YOUR CODE GOES HERE
//
if (x % 15 == 0) {
return "fizzbuzz";
}
else if (x % 5 == 0) {
return "buzz";
}
else if (x % 3 == 0) {
return "fizz";
}

else
return x;

};

module.exports = { fizzbuzz: fizzbuzz };