I have a query that returns a array
where I want to pop a select
dynamically, but by the code below it gives undefined
for(var i = 0; i <= cidades.length; i++){
var html = "";
html += "<option>" + cidades[i] + "</option>";
document.getElementById("cidade").append(html);
}