Most examples I\'ve seen have scripts in a html page being enclosed by
I\'ve tried writing it without the comment tags a
It's still a problem nowadays if your page gets processed by a sanitation parser that sanitizes by only rewriting the tag into . If you leave in the comment tag, then if the script tag gets sanitized, then at least your javascript will still be hidden from the user by the comment tags. If you leave out the comments, the code will be visible.
An example of a sanitation parser is Google Translate, Google Cache or Proxomitron.