[Javascript] Function arguments...

Carlos carlos at unica.cu
Thu May 3 09:13:13 CDT 2001


function Modify(X) {
  X = X + 5;
  return(X);
}

Oh...I understand that if you return the value of X to the caller, then you
can get the value of X, but what about if you want to return another value
to the caller but still you desire to modify the value of X, for example...

function Modify(X) {
  X = X + 5;
  return(X * 10);
}

I'm only want to know if it is possible without using objects properties,
like this example:

function Modify(X) {
  X.Increment = X + 5;
  X.Multiplication = X * 10;
}

The above code, works, but well, that's not what I meant, if anyone
inderstood...

Carlos





More information about the Javascript mailing list