javascript get all options from select

JavaScript
//looping through options select with jQuery
$("#mySelectID option").each(function(){
    var thisOptionValue=$(this).val();
});x.options.length
Source

Also in JavaScript: