The length property of the HTMLSelectElement interface specifies the number of <option> elements in the <select> element. It represents the number of nodes in the options collection. On setting, it acts as (HTMLOptionsCollection.length).
A number.
const selectElement = document.getElementById("fruits");
console.log(selectElement.length);