Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 413 Bytes

README.md

File metadata and controls

7 lines (4 loc) · 413 Bytes

FizzBuzz

Implement a function that returns an array with the numbers from 1 to n, but for multiples of three add 'Fizz' instead of the number and for the multiples of five add 'Buzz' into the array. For numbers which are multiples of both three and five add 'FizzBuzz'.

Example

FizzBuzz(100) // returns [1, 2, "Fizz", 4, "Buzz", 6, 7, ... 13, 14, "FizzBuzz", ... until 100 ]