docs: private static Scriptable js_reverse(Context cx, Scriptable thisObj, Object[] args)
      {
          if (thisObj instanceof NativeArray) {
              NativeArray na = (NativeArray) thisObj;
              if (na.denseOnly) {
                  for (int i=0, j=((int)na.length)-1; i < j; i++,j--) {
                      Object temp = na.dense[i];
                      na.dense[i] = na.dense[j];
                      na.dense[j] = temp;
                  }
                  return thisObj;
              }
          }
          long len = getLengthProperty(cx, thisObj, false);
  
          long half = len / 2;
          for(long i=0; i < half; i++) {
              long j = len - i - 1;
              Object temp1 = getRawElem(thisObj, i);
              Object temp2 = getRawElem(thisObj, j);
              setRawElem(cx, thisObj, i, temp2);
              setRawElem(cx, thisObj, j, temp1);
          }
          return thisObj;
      }