diff --git a/fizzbuzz.js b/fizzbuzz.js index bd1f6cf..d63108b 100644 --- a/fizzbuzz.js +++ b/fizzbuzz.js @@ -4,12 +4,12 @@ // Make sure to look at test.script.js--that should give you some hints about what is // expected here. -'use strict'; +"use strict"; var fizzbuzz = function (x) { -// -// YOUR CODE GOES HERE -// + const result = [x, "fizz", "buzz", "fizzbuzz"]; + + return result[!(x % 3) + !(x % 5) * 2]; }; module.exports = { fizzbuzz: fizzbuzz }; diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json new file mode 100644 index 0000000..0f6e5f6 --- /dev/null +++ b/spec/support/jasmine.json @@ -0,0 +1,11 @@ +{ + "spec_dir": "", + "spec_files": [ + "**/*[sS]pec.js" + ], + "helpers": [ + "helpers/**/*.js" + ], + "stopSpecOnExpectationFailure": false, + "random": true +}