三目运算符

三目运算符

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

if(a) {


return b;


} else {


return c;


}

posted @ 2019-07-20 22:47  _liuxg  阅读(162)  评论(0编辑  收藏  举报