Skip to content

Instantly share code, notes, and snippets.

@paulbaumgart
Created February 29, 2012 22:35
Show Gist options
  • Save paulbaumgart/1945036 to your computer and use it in GitHub Desktop.
Save paulbaumgart/1945036 to your computer and use it in GitHub Desktop.
Quiz: what does this HTML file display when rendered?
<script>
<!--
//<script></script> not displayed
-->
//<script></script> displayed
</script>
<br />
<script>
<!--
var a,b;
//<script></script> not displayed
a-- >b;
//<script></script> not displayed
a-->b;
//</script> displayed
</script>
<br />
<script>
<!--
//<script><script></script></script> displayed
</script>
@danbeam
Copy link

danbeam commented Mar 4, 2012

Also:

typeof (function(a) {
  return 1<!--a;
}(2))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment