1 2 3 4 5 6
var ipoteka = function(S,p,n) { p = p / 1200; n = n * 12; return (S * p)/(1 - Math.pow(1 + p, -n)); } console.log(ipoteka(8e6,15,10));