js select option get all value code example
Example 1: javascript get all select options
var options = document.getElementById('mySelectID').options;
for (let i = 0; i < options.length; i++) {
console.log(options[i].value);//log the value
}
Example 2: javascript get all options from select
x.options.length