js中使用 && 实现 if 判断

$step < 1 && $step = 5;

等于

if($step < 1) {
    $step = 5;
}

  

猜你喜欢

转载自www.cnblogs.com/fm060/p/11671764.html