Why does the following code return 0.30000000000000004?
function nfunc(f1, f2) {
return f1 + f2
}
console.log(nfunc(0.2, 0.1));
> 0.30000000000000004
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
A site where you can share knowledge
Why does the following code return 0.30000000000000004?
function nfunc(f1, f2) {
return f1 + f2
}
console.log(nfunc(0.2, 0.1));
> 0.30000000000000004
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment