It’s so hard to search for symbols in Google, so I ask here instead.
<!-- looks like a comment for me, but it doesn’t work like html. Or it’s a one line comment just like // ?
What is the purpose and benefit of using this? Thanks
sample code :
<script type="text/javascript">
<!--
alert("example");
//-->
</script>
It’s an old method of hiding JavaScript from browsers that would treat the text node of a
scriptelement as normal text (and display your code).Douglas Crockford recommends you don’t use it anymore.