When a browser's html parser sees the string "</script>", regardless of whether it is in a javascript string or not, it sees it as a closing script tag and ends the current script block. Breaking the "</script>" tag into two pieces prevents this from happening when you need it as a javascript string.