If you make it like this, you'll get syntax error:
JavaScript doesn't know HTML's comment closing -->
, so it has to be commented out of script.
There is no need to use HTML-comments to separate JavaScript, except if you're using a simple text editor which colours the code (NoteTab etc.).