Created
September 10, 2014 23:43
-
-
Save ah01/cfb69afefab8a7e10b95 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
alert(typeof(f)); // --> function | |
function f() {} |
This file contains hidden or 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
alert(typeof(f)); // --> undefined | |
var f = function () {}; |
This file contains hidden or 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 f = function () { | |
return typeof(f); | |
} | |
var g = f; | |
f = 42; | |
alert(g()); // --> number |
This file contains hidden or 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 f = function f() { | |
return typeof(f); | |
} | |
var g = f; | |
f = 42; | |
alert(g()); // --> function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment