Return values follow the rules for returning types from JavaScript to managed code using by-reference marshaling rules. For more information, see Returning or Passing Managed Types to JavaScript.
The possible types for args follow the rules for passing managed types to JavaScript using by-reference marshaling rules.
If args is nullNothingnullptra null reference (Nothing in Visual Basic), it is interpreted as an empty parameter list. As a result, passing nullNothingnullptra null reference (Nothing in Visual Basic) is the same as passing new object[].
The actual type of the return value is always a string, a primitive type, or a ScriptObject reference. If the underlying value of the requested property is a managed type (other than a derivation of ScriptObject), you can use the ManagedObject property to get the underlying managed type reference.