By default, comments are disabled in zsh’s interactive interpreter:

[warrick@maca ~] % # comment
zsh: bad pattern: #

I find this to be an incredibly annoying default, but here is how you enable such comments:

[warrick@maca ~] % setopt interactivecomments