Last active
August 29, 2015 14:00
-
-
Save torgeir/11287697 to your computer and use it in GitHub Desktop.
js number coercing
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
var n = Number(1); | |
var m = n; | |
n = null; | |
console.log(m); // 1 | |
var o = new Number(1); | |
var p = o; | |
o = null; | |
console.log(p); // {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment