Skip to content

Instantly share code, notes, and snippets.

@gaplo917
Last active June 22, 2016 16:19
Show Gist options
  • Save gaplo917/9d056dd1ee9193a83e5c7d807f2b853f to your computer and use it in GitHub Desktop.
Save gaplo917/9d056dd1ee9193a83e5c7d807f2b853f to your computer and use it in GitHub Desktop.
V8 Bug?
// https://blog.gaplotech.com/content/images/2016/06/Screen-Shot-2016-06-22-at-22-09-29.png
// Result not consistent : 12291 false, 37709 true
for(var i=0; i<50000; ++i) {
console.log(typeof null === 'undefined')
}
// OR
for(var i=0; i<50000; ++i) {
console.log(typeof null == 'undefined')
}
// Quick fix
for(var i=0; i<50000; ++i) {
console.log(null === undefined)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment