const multiply = (a, b) => { let n = 1; while (a != Math.trunc(a)) { a *= 10; n *= 10; } while (b != Math.trunc(b)) { b *= 10; n *= 10; } return a * b / n } alert(multiply(-8.87, -8.87));