Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript global object

//Access Global variable
var foo = "foobar";
foo === window.foo; // Returns: true


//Accessing Global Functions
function greeting() {
   console.log("Hi!");
}

window.greeting(); 
 
PREVIOUS NEXT
Tagged: #javascript #global #object
ADD COMMENT
Topic
Name
3+7 =