Refactored the Fizzbuzz problem

Updated the Fizzbuzz problem in Javascript to work and then refactored
it to make it better.