Node.js examples for Number:Algorithm
Number to String fizz buzz
Number.prototype.toString = function(){ var fizzBuzz = ''; if(this%3 == 0){ fizzBuzz = "Fizz"; }//from w w w .ja va 2 s .c om if(this%5 == 0) { fizzBuzz += "Buzz"; } return fizzBuzz || this + ''; }