Q:

TestComplete: How do i use an object reference in another function while scripting in Testcomplete?

I am using jscript for scripting in Testcomplete.
I have a function 
function A()
{
return someobjReference ; //this variable contains a reference
}
function B()
{
}
I need to use the object reference(someobjReference ) in function B().How can i do that?
Thanks !

A:

The JScript language used in TestComplete is the JavaScript language implementation from Microsoft. You can find a lot of information on JavaScript language in Internet or in printed books.
As for your question, you can do this in the following manner:
function B()
{
  var objRef = A();
  // use objRef, for example:
  // Log.Message(objRef.Name);
}

