var priceProduct = 2000;
var totalPrice = 230;
var totalPayback = priceProduct / totalPrice;
console.log(Math.ceil(totalPayback));
var priceProduct = 2000;
var totalPrice = 230;
var PayBackMonth = 0;
while( totalPrice <= priceProduct )
{
priceProduct += totalPrice;
PayBackMonth++;
}
// Ответ
console.log(PayBackMonth++);