https://github.com/brookr/fizzbuzz-1
fizzbuzz playground
https://github.com/brookr/fizzbuzz-1
Last synced: 5 months ago
JSON representation
fizzbuzz playground
- Host: GitHub
- URL: https://github.com/brookr/fizzbuzz-1
- Owner: brookr
- Created: 2015-09-09T17:56:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-08T21:34:44.000Z (almost 11 years ago)
- Last Synced: 2025-01-09T12:52:28.968Z (over 1 year ago)
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.