Skip to content

Instantly share code, notes, and snippets.

@markhibberd
Created October 3, 2013 22:42
Show Gist options
  • Save markhibberd/6818249 to your computer and use it in GitHub Desktop.
Save markhibberd/6818249 to your computer and use it in GitHub Desktop.
> var name = function() {}
> typeof name
"string"
> var namex = function() {}
> typeof namex
"function"
@techtangents
Copy link

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

@techtangents
Copy link

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