An open API service indexing awesome lists of open source software.

https://github.com/brookr/fizzbuzz-1

fizzbuzz playground
https://github.com/brookr/fizzbuzz-1

Last synced: 5 months ago
JSON representation

fizzbuzz playground

Awesome Lists containing this project

README

          

FizzBuzz Challenge

The challenge:


Write a method that takes one number as an argument. For multiples of three return “Fizz”, and for the multiples of five return “Buzz”. For numbers which are multiples of both three and five return “FizzBuzz”, and in all other cases return the number.


Add one file to solve this as stated above with the simplest, most readable code you can manage.

Approach

I used a filter down approach where the most specific case is caught first then it was filtered down through less specific checks.