I am try to solve a problem of LEETCODE using JavaScript, the problem is Multiply Strings and the solution is:
const string = (num) => {
return '' + num
}
var multiply = function(num1, num2) {
let result = string(num1*num2)
return result
};
console.log(multiply("123456789",
"987654321"))
it should return "121932631112635269"
but it returns 121932631112635260
Any Solution?
"123456789" * "987654321" should return "121932631112635269"
but it returns 121932631112635260