How to "save" variable

S

sindre hiåsen

Hi,

I need a way to save a variable in a function.

I want to do something like this.
On functioncall set a variable and another function call gets the variable
set by the other function call.

Something like this.

function set_get(name)
{
if(name != "")
var name = name;
else
return name;
}

Sindre
 
S

sindre hiåsen

Hi,

I need a way to save a variable in a function.

I want to do something like this.
On functioncall set a variable and another function call gets the
variable set by the other function call.

Something like this.

function set_get(name)
{
if(name != "")
var name = name;
else
return name;
}

Sindre

Hi,

Sorry to bother. This was as simple as I thought, so I did find it out.

Sindre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top