"use strict";

var limit = (process.argv.length == 3) ? parseInt(process.argv[2]) : 100;

for(var i = 1; i < limit; i++) {
 if (i % 3 == 0) {
    console.log ("Fizz");
  } else if (i % 5 == 0) {
    console.log ("Buzz");
  } else if (i % 3 == 0 && i % 5 == 0) {
    console.log ("FizzBuzz");
  } else {
    console.log (i);
  }
}

"use strict";

var limit = (process.argv.length == 3) ? parseInt(process.argv[2]) : 100;

for(var i = 1; i < limit; i++) {
  if (i % 3 == 0 && i % 5 == 0) {
    console.log ("FizzBuzz");
  } else if (i % 3 == 0) {
    console.log ("Fizz");
  } else if (i % 5 == 0) {
    console.log ("Buzz");
  } else {
    console.log (i);
  }
}

Test for divisibility of 3 and 5 first so that "FizzBuzz" is actually printed
Test for divisibility of 3 and 5 first so that "FizzBuzz" is actually printed
