A global reference to the global object... |
global // the global object |
Not applicable.
The global 'global' property is a reference to the global object.
var bar = "kipper"; function foo() { var bar = "halibut"; console(bar); // halibut console(global.bar); // kipper } |
(function(){ // https://warzone.atlassian.net/wiki/display/jsapi/Code+sandboxing var eventStartLevel; // oops, now we can't define global eventStartLevel from in here :( // oh, yes we can! :) global.eventStartLevel = function() { // code } })(); |
AvailabilityThis feature requires:
|
ContentsJump to: |
See alsoRelated articles:
|
GlobalsTopics: |