JS Pesan Timeout

function sendFeedback(message, timeout = 5000)
{
    let feedbackItem = document.querySelector('[item-type="feedback"]');

    if (!feedbackItem) {
        return;
    }

    feedbackItem.innerHTML = message;
    feedbackItem.classList.add('active');

    setTimeout(() => {
        feedbackItem.feedbackItem.innerHTML = '';
    }
    , timeout);
}
Tiago F2