docs: public static Object setObjectIndex(Object obj, double dblIndex,
                                          Object value, Context cx,
                                          Scriptable scope)
      {
          Scriptable sobj = toObjectOrNull(cx, obj, scope);
          if (sobj == null) {
              throw undefWriteError(obj, String.valueOf(dblIndex), value);
          }
  
          int index = (int)dblIndex;
          if (index == dblIndex) {
              return setObjectIndex(sobj, index, value, cx);
          }
          String s = toString(dblIndex);
          return setObjectProp(sobj, s, value, cx);
      }