code: function multiply(arr, arg) {
      var row, col, nrescols, sum, nrow, ncol, res, rescols;
      // eg: arr = 2 arg = 3 -> 6 for res[0][0] statement closure
      if (arr.length === undefined && arg.length === undefined) {
        return arr * arg;
      }
      nrow = arr.length,
      ncol = arr[0].length,
      res = jStat.zeros(nrow, nrescols = (isUsable(arg)) ? arg[0].length : ncol),
      rescols = 0;
      if (isUsable(arg)) {
        for (; rescols < nrescols; rescols++) {
          for (row = 0; row < nrow; row++) {
            sum = 0;
            for (col = 0; col < ncol; col++)
            sum += arr[row][col] * arg[col][rescols];
            res[row][rescols] = sum;
          }
        }
        return (nrow === 1 && rescols === 1) ? res[0][0] : res;
      }
      return jStat.map(arr, function(value) { return value * arg; });
    }
docs: matrix multiplication