Answers for "nodejs global object"

9

javascript global object

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


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

window.greeting();
Posted by: Guest on August-18-2021
0

nodejs global

//Two ways to access global
> console.log(global)
//or
> global
 
//Adding new property to global
> global.car = 'delorean'
Posted by: Guest on January-01-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language