Question: how to select multiple values in dropdown in javascript?
Answer: document. getElementById('submit'). onclick = function() {
var select = document. getElementById('pets');
var selected = [... select. options]
. filter(option => option. selected)
. map(option => option. value);
alert(selected);