class Answer { constructor(input) { this.data = Number(input); this.ans = ''; } main() { for(let i=0;this.data>i;i++) { this.FizzBuzz((i+1)); this.dest(this.ans); } } FizzBuzz(num) { if(num % 3 === 0) this.ans += 'Fizz'; if(num % 5 === 0) this.ans += 'Buzz'; if(this.ans === '') this.ans = num; } dest(ans) { console.log(ans); this.ans = ''; } } new Answer(require("fs").readFileSync("/dev/stdin", "utf8")).main();