FizzBuzz in JavaScript

While learning JavaScript, I wrote this little program the other day using a for loop.

It counts up to any number you choose. But instead of numbers divisible by 3, it prints 'Fizz'. And instead of numbers divisible by 5, it prints 'Buzz'. For numbers divisible by both 3 and 5, it prints 'FizzBuzz'. Tiny victories.

// Prompts the user to pick a number
var number = prompt("Pick a number to FizzBuzz up to!");

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