Skip to content

Instantly share code, notes, and snippets.

@halan
Last active December 22, 2015 10:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halan/6456215 to your computer and use it in GitHub Desktop.
Save halan/6456215 to your computer and use it in GitHub Desktop.
V8 Bug!
<script>
a = 'Bug'
r = {z: {x: a}, z: 'Not Bug!'}
if(r.z == 'Not Bug!')
document.write('<style>html{background: green}</style>')
else
document.write('<style>html{background: red}</style>')
</script>
$ node
> a = 'Bug'
'Bug'
> r = {z: {x: a}, z: 'Not Bug!'}
{ z: { x: 'Bug' } }
> r = {z: {x: 'What?'}, z: 'Not Bug!'}
{ z: 'Not Bug!' }
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment