SOURCE

function multi(a, b) {
    var a_num = [];
    var b_num = [];
    var result = [];
    var a_result = [];
    if (!(typeof(a)==='string') || !(typeof(b)==='string')) {
      return;
    }
     for (var i = 0; i<a.length;i++) {
       a_num.push(parseInt(a[i]));
     }
    for (var j = 0; j<b.length;j++) {
       b_num.push(parseInt(b[j]));
    }
   
    for (var k = 0; k<b_num.length; k++) {
      for (var m = 0; m<a_num.length; m++) {
        var temp = a_num[k]*b_num[m];
          if(!result[k+m]) {
          result[k+m] = temp;
        } else {
          result[k+m] = result[k+m] + temp;
        }
      }
  }
  result.reverse();
  console.log(result);
  for (var n=0;n<result.length;n++) {
    if(result[n]>9) {
        var temp2 = result[n];
        result[n] = result[n]%10;
        if(n===result.length) {
            result[n+1] = parseInt(temp2/10);
        } else {
            result[n+1] = result[n+1]||0 + parseInt(temp2/10);
        }
    }
}
  result.reverse();
 
  console.log( result.join(''));
} 

multi('92','92');
console 命令行工具 X clear

                    
>
console