So I made a list in html and gave every option a value of numbers (0,1,2,...) and gave all the options the same class 'op' and then I want to save this values in an array in javascript but my code doesn't seem to work.
output should be [0,1,2,3,...] instead nothing happens
let valuesofnames = [];
let valuesfromhtml = document.getElementsByClassName('op').value;
valuesofnames.push(valuesfromhtml);
console.log(valuesofnames)