I have recently inherited some web code and found that all the Java Script scripts are contained within HTML comment tags
For example:
<script type="text/javascript" language="javascript"><!--
function ValidateForm() { ... }//-->
As I understand it, this method prevented older, non-supported, browsers from interpreting your Java Script. However this is not something I was ever taught to do, and I wonder if this is now considered to be unnecessary, or is this still a common practice? If so, why?
Update: Thanks to kennebec for your advice to leave them in, which I have done for now, and thanks to Emmett also: I’ll be sure to leave them out of any future code I write!
http://javascript.crockford.com/script.html: