The variables declared by let in eslint are used in if and are reported as defined but not used. How to solve the problem?

The

code looks something like this:

let c = 0;
if(a<b){
    c+=3
}

"c"is assigned a value but never used. (no-unused-vars)

Aug.19,2021

your c is really not used. cantilever 3 just recalculates and assigns c. In the end, what c does not write.
what did you do with c, such as return c or console.log (c) ?

Menu