This is a web application in NodeJS that takes a collection of values.
- If the value is a multiple of 3, then output the word "Fizz"
- If the value is a multiple of 5, then output the word "Buzz"
- If the value is divisible by both 3 and 5, then output the word "FizzBuzz"
- At the end of the run, the program should display each division that was performed.
Node v11.0.0 or higher.
To run this application, clone the repository and run npm run start
. Next, open http://localhost:9000. Add, change, or remove values in the text area. Then click the FizzBuzz!
button to process the values.
/fizzbuzz
(POST)
Make a request with a valid JSON array body containing values to be processed. An array with FizzBuzz results will be returned.
Example Request Body
[
"1",
"3",
"5",
"",
"15",
"A",
"23"
]
Example Response Body
[
"Divided 1 by 3",
"Divided 1 by 5",
"Fizz",
"Buzz",
"Invalid Item",
"FizzBuzz",
"Invalid Item",
"Divided 23 by 3",
"Divided 23 by 5"
]