三目运算符

三目运算符

a ? b : c简单理解方式为:

if(a) {


return b;


} else {


return c;


}

原文地址:https://www.cnblogs.com/liuxgcn/p/11219651.html