#判断优化(处理多个选择优化)
//bad if(condition = 'aa' ||condition = 'bb' || condition = 'cc' ){ //TODO } //good let Regcondition = /^(aa|bb|cc)$/; Regcondition.test(condition)//goodvar collection = ['aa','bb','cc'];collection.includes(condition)
#