js 三元表达式 复杂写法
a = 0
b = 0
a === 0 && (a = 1,b = 2)
a === 1 ? (a = 3,alert(b)) : (b = 4)
a === 1 || alert(a)
本文来自博客园,作者:驸马爷,转载请注明原文链接:https://www.cnblogs.com/cnblogs-jcy/p/6346998.html
a = 0
b = 0
a === 0 && (a = 1,b = 2)
a === 1 ? (a = 3,alert(b)) : (b = 4)
a === 1 || alert(a)
本文来自博客园,作者:驸马爷,转载请注明原文链接:https://www.cnblogs.com/cnblogs-jcy/p/6346998.html