11 lines
352 B
JavaScript
11 lines
352 B
JavaScript
const nothing = require('./nothing.js');
|
|
const helper = require('./nothing-helper.js');
|
|
const fizzbuzz = (x) => {
|
|
let a = [];
|
|
for (let i = 1; i <= x; i++) {
|
|
a.push(i % 15 ? i % 5 ? i % 3 ? i : "Fizz" : "Buzz" : "FizzBuzz");
|
|
}
|
|
return a;
|
|
};
|
|
console.log(helper.check_represent(nothing.FIZZBUZZ(helper.representation_of(100)), fizzbuzz(100)));
|