NĂºmero de habitantes:
50.000
R$ [Valor]
function updateProjection() { const slider = document.getElementById("populationSlider"); const populationDisplay = document.getElementById("population"); const profitProjection = document.getElementById("profit"); const population = slider.value; populationDisplay.textContent = `${parseInt(population).toLocaleString()}`; profitProjection.textContent = `R$ ${calculateProfit(population)},00`; } function calculateProfit(population) { return Math.round(population * 0.01); } window.onload = updateProjection; #populationSlider { width: 100%; }