if else的简写: a == 12 ?alert(‘ok‘):alert(‘no ok‘);//三目,三元 if(a==12)alert(‘ok‘); fn&&fn();
if else的简写
原文:http://www.cnblogs.com/yang0902/p/5697998.html