标签: if-statement nested
if (a or b) if (a) //do something else //do something else //do something
如何重构上面的嵌套if?
答案 0 :(得分:1)
if (a) { //do something } else if (b) { //do something } else { //do something }