document.querySelector('button').addEventListener('click', function() {
const bar = document.querySelector('#progress');
const label = document.querySelector('#procent');
let width = 0;
const interval = setInterval(function() {
if (++width >= 100) {
clearInterval(interval);
}
bar.style.width = label.innerText = `${width}%`;
}, 10);
});