docs: private static int js_lastIndexOf(String target, Object[] args) {
          String search = ScriptRuntime.toString(args, 0);
          double end = ScriptRuntime.toNumber(args, 1);
  
          if (end != end || end > target.length())
              end = target.length();
          else if (end < 0)
              end = 0;
  
          return target.lastIndexOf(search, (int)end);
      }