Fizz-Buzz in OOP and FP style
4 min readFeb 1, 2023
Fizz-Buzz is a simple programming task used in coding interviews to test a candidate’s basic programming skills and understanding of control flow constructs. The task involves counting from 1 to a specified number, and for each number that is divisible by 3, printing “Fizz”, for each number divisible by 5, printing “Buzz”, and for numbers divisible by both 3 and 5, printing “Fizz-Buzz”. In this article we will implement this program in object-oriented style (OOP) and and functional programming style (FP), in order to see the differences between these two paradigms.