How to sum and recognize and return case '0' , and '-' in

后端 未结 0 1330
予麋鹿
予麋鹿 2021-01-03 12:07
function sum2(num) {
  let sum ;
  let str = String(num)
  for(let i = 0 ; i < str.length; i++){
  if(i === 0) {
    sum =          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题