5 ms·
Really great idea, would be super useful, it looks like its still got a ways to go though, it doesn't seem to recognize global variables yet for one http://sta
by wavesounds 14y ago
Really great idea, would be super useful, it looks like its still got a ways to go though, it doesn't seem to recognize global variables yet for one
http://stackoverflow.com/questions/235360/what-is-the-scope-of-a-function-in-javascript-ecmascript http://stackoverflow.com/questions/235360/what-is-the-scope-...
- Kudos 14y agoIf you're using strict Javascript (and you should be) there are no implicit global variables.
- riffraff 14y agohow would an example of javascript without implicit global variables work? For example, how does it get access to "Array", "require" or "window" ? (I don't think "use strict" goes to the length of turning javascript into bracha's newspeak but I may likely have no idea what "strict javascript" actually refer to)
- mostlystatic 14y agoYou can access global variables as normal, but you can't implicitly declare them by doing `myGlobaVar = 5` - you have to use `window.myGlobalVar`.