JS判断是正数还是负数:
|
1
|
function check(x){ if(x>0){ return '正数'; }else if(x<0){ return '负数'; } }
|
JS判断是正数还是负数:
|
1
|
function check(x){ if(x>0){ return '正数'; }else if(x<0){ return '负数'; } }
|