DEV Community

loading...

Discussion on: Daily Challenge #271 - Simulate Population Growth

Collapse
mgilangjanuar profile image
M Gilang Januar • Edited
const nb_year = (p0, percent, aug, p) => p <= p0 
  ? 0 
  : 1 + nb_year(p0 * (percent / 100) + aug + p0, percent, aug, p)