$0 / $1000 Raised
const goal = 1000; // your goal let raised = 200; // current amount const updateProgressBar = () => { const pct = Math.min((raised / goal) * 100, 100); document.getElementById('progress-bar').style.height = pct + '%'; document.getElementById('donation-raised').textContent = '$' + raised; }; updateProgressBar();