This sketch plays fizz buzz using the frame count.
- When the frame count is a multiple of 3, it shows “Fizz”
- When it’s a multiple of 5, it shows “Buzz”
- When it’s a multiple of both, it shows “Fizz Buzz”
- Otherwise, it shows the frame count
Click here to edit this code in the p5.js editor.
- Show different messages instead of fizz and buzz
- Add other numbers, for example say “boz” when frame count is a multiple of 7
- Show “fizz” when the number contains a 3, not just when it’s a multiple of 3