Eslint reported an error. 'how to correct baseurl' is assigned a value but never used?

let baseurl = `/search?keyword=${key} `;///"baseurl" is assigned a value but never used  
        baseurl += "&page=1";
        if (this.checkAll === false) {
          baseurl += "&range=";
          for (let i = 0; i < this.checkedParts.length; iPP) {
            if (i === this.checkedParts.length - 1) {
              baseurl += this.checkedParts[i];
            } else {
              baseurl += `${this.checkedParts[i]},`;
            }
          }
        }
Apr.02,2021
Is the

baseurl variable used anywhere after a + = operation? The error will be reported if it is not used.


English is very important to programmers. If this is prompted in Chinese, I think you should know what to do.
Let me help you translate
baseurl assigned a value, but never used it.
do you know how to do this one?


literally, you don't use this variable. In the code you give, baseurl is assigned a variety of values, but does not use baseurl . For example: assigned to other variables, as function parameters.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34a1a-2bf41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34a1a-2bf41.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?