function fizzBuzz(num?: number) {
  let _n = num || 100;

  for (let i = 1; i < _n; i++) {
    if (i % 5 === 0 && i % 3 === 0) {
      console.log(i + " FizzBuzz");
      continue;
    }

    if (i % 3 === 0 && i % 5 !== 0) {
      console.log(i + " Fizz");
      continue;
    }

    if (i % 3 !== 0 && i % 5 === 0) {
      console.log(i + " Buzz");
      continue;
    }

    console.log(i + "");
  }
}

function fizzBuzzAuthorSolution() {

  for (let n = 1; n < 100; n++) {
    let output = "";

    if (n % 3 === 0) output += "Fizz";
    if (n % 5 === 0) output += "Buzz";

    console.log(output || n);
  }

}

// fizzBuzz();
fizzBuzzAuthorSolution();
