Created
August 19, 2012 03:22
-
-
Save jesboat/3391537 to your computer and use it in GitHub Desktop.
This exhibits a bug in Chrome's JS engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<title>Rawr</title> | |
<p>JS follows | |
<pre> | |
<script type="text/javascript"> | |
function wr(str) { | |
document.write(str + "<br>"); | |
} | |
var a = {valueOf: function(x) { wr("a"); return 1; }}; | |
var b = {valueOf: function(x) { wr("b"); return 2; }}; | |
wr("less than is"); | |
wr(a < b); | |
wr("greater than is"); | |
wr(a > b); | |
</script> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment