Created
October 3, 2013 22:42
-
-
Save markhibberd/6818249 to your computer and use it in GitHub Desktop.
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 name = function() {} | |
> typeof name | |
"string" | |
> var namex = function() {} | |
> typeof namex | |
"function" |
Looks like executing any javascript in global scope is bad. As soon as you're in function scope, it's fine:
> var name=function(){}; console.log(typeof name);
string
> (function() { var name=function(){}; console.log(typeof name); })();
function
Looks like executing any javascript in global scope is bad.
Actually, I think this generalises to:
Javascript is bad.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
s/javascript/* programming language