I've wondered before how many of the "OMG tons of candidates can't fizzbuzz" anecdotes come down to messing up syntax or forgetting the name of something in the language they're using and mixing in something from another language, or making a plausible but incorrect guess. I could definitely see doing those things in an interview, and I've usually been considered the "smart one" or one to come to with weird/low-level/architecty problems where I've worked. Hell I know for a fact I once used the wrong friggin'
method invocation syntax in an interview. That stuff barely has any place in my long-term memory, I mostly rely on context to get it right when doing real work.
I can also see a lot of folks forgetting about the modulus operation and doing something uglier and smug interviewers deciding that means they're a fraud and/or an idiot. I've only used it a handful of times in real code, in... oh man, over 15 years. If it hadn't been (for some reason) among the first things I picked up when first learning to write code it might not be as relatively-well stuck in my head as it is.