Why we check FizzBuzz in first if statement

I have seen FizzBuzz challenge here and there and what I do not understand is why we do
//if multiple of 3 and 5 then print FizzBuzz
//else if , if multiple of 3 then print Fizz
//else if, if multiple of 5 then print Buzz,

My question why we take 3 and 5 as first if, why not last? I always get so confused about this and end up writting 3 and 5 last but without a logic don’t know why it should be first.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.