0

It is not related to Javascript purely. I am using NodeJS.

var common_admin_users_param = {
    Limit:      60,
    GroupName: "admin",
    NextToken:  undefined
};

function getAdminUserParams() { 
    alert(this.common_admin_users_param); // undefined
}

getAdminUserParams();

I am wondering why it is giving me undefined.

My requirement is that my common_admin_users_param is global variable having some default values.

But i want the unique copy of this global variable for each session. So, I made function which will return current instance of this global variable.

Any help?

Code snippet: JSFiddle

(It is now working :))

Jayesh Dhandha
  • 1,465
  • 18
  • 37

0 Answers0