const select = document.querySelector('select');
const ul = document.querySelector('.testClassUl');
select.addEventListener('change',()=>{
const selectedOptions = select.querySelectorAll('option:checked')
ul.innerHTML = "";
for(const option of selectedOptions){
var li = document.createElement("li");
li.classList.add('testClassLi');
li.innerText = option.innerText;
ul.appendChild(li);
}
});