code: @JSFunction
      public static Object varargs(Context cx, Scriptable thisObj,
                                              Object[] args, Function funObj)
      {
          StringBuilder buf = new StringBuilder();
          buf.append("this = ");
          buf.append(Context.toString(thisObj));
          buf.append("; args = [");
          for (int i=0; i < args.length; i++) {
              buf.append(Context.toString(args[i]));
              if (i+1 != args.length)
                  buf.append(", ");
          }
          buf.append("]");
          return buf.toString();
      }
docs: An example of a variable-arguments method.
  
  All variable arguments methods must have the same number and
  types of parameters, and must be static. <p>
  @param cx the Context of the current thread
  @param thisObj the JavaScript 'this' value.
  @param args the array of arguments for this call
  @param funObj the function object of the invoked JavaScript function
  This value is useful to compute a scope using
  Context.getTopLevelScope().
  @return computes the string values and types of 'this' and
  of each of the supplied arguments and returns them in a string.
  
  @see org.mozilla.javascript.ScriptableObject#getTopLevelScope