Say you had the HTML code of <select id="eight"><option value="Number1">Number 1</option></select>
.
In JavaScript, if you wanted to get the value of the selected item in the drop-down list, there would be two ways being document.getElementsByTagName("option")[0].innerText;
and document.getElementsByTagName("option")[0].value;
.
The first would output the text in the option tag (being "Number 1", and the other will output the value of the option tag (being "Number1").
Which one would be more effective in JavaScript? Speed difference? Is there another way to get the value that is faster or more efficient. Etc. Sorry if this is a duplicate.