Excuse me, can this kind of code still be optimized?

        if (resState == 8) {//
            li_one.appendTo("-sharphaved .ul-list");
            li_one.find(".status").html("");
        } else if (resState == 9) {
            li_one.appendTo("-sharphaved .ul-list");
            li_one.find(".status").html("");
        } else if (resState == 10) {
            li_one.appendTo("-sharphaved .ul-list");
            li_one.find(".status").html("");
        } else if (resState == 11) {
            li_one.appendTo("-sharphaved .ul-list");
            li_one.find(".status").html("");
        } else if (resState == 12) {
            li_one.appendTo("-sharphaved .ul-list");
            li_one.find(".status").html("");
        } else if (resState == 13) {
            li_one.appendTo("-sharphaved .ul-list");
            li_one.find(".status").html("");
        }

as above, how efficient is the execution of this kind of code? Mengxin asks for advice on crabs

Nov.12,2021

execution efficiency is fine, just simplify the code

  

jquery should give up.. Walk into the arms of vue and react

Menu