9 配列があり、indexOfの機能がありますか? if(["str1","str2","str3","str4"].indexOf(this.selectedItem.label) > -1){ // found } これはクロスブラウザソリューションです。 まあ、includes質問のこの種は、より良いhttps://codereview.stackexchange.com/に頼まれ if(["str1","str2","str3","str4"].includes(this.selectedItem.label)){ } 出典 2017-08-16 10:57:23
2 if(["str1", "str2"].indexOf(this.selectedItem.label) !== -1) { // TO DO } 出典 2017-08-16 10:58:16 TSV
(はIEでをテストしていません) – Jens