Helpful until that code is run through a minification which strips all comments and is not aware of such things!
Annoyingly, code from a 3rd party that is part of our application was being minified in production mode and uses this technique to identity if a browser is IE or not. Which gave very spurious results when testing IE… The solution for us, rather than hacking the 3rd party code was to use a direct include of the file into the pages that require it, and to use ?v=x.x.x after the filename in the source to ensure we can still force reloads in clients after we make changes to it (probably just an upgrade) in future. This was something the merging and minification process kindly gave us for free. In this case I made the number match the version of the 3rd party source we are using for consistency. This is a pain in that it requires changes to templates and it not automatic, but modifications to the included file in this case are likely to be rare, and is the easiest option allowing the rest of our assets to still be merged and minified.