I'm doing tests with array / vector and as the first vector display should be shown empty, as second, would come full. What's the problem, why does it occur? And how can I fix it?
<ul><li>Murilo</li><li>Mariana</li><li>Steve</li><li>Mark</li><li>Couve</li></ul><scripttype="text/javascript">
var lista = document.querySelectorAll("li");
var vetor = new Array();
console.log("Vetor sem arquivos");
console.log(vetor);
function insertIn(vetor, lista){
for(var i = 0; i < lista.length; i++){
vetor.push(lista[i]);
}
}insertIn(vetor, lista);
function mostraDados(vetor){
console.log("Vetor com arquivos");
console.log(vetor);
}mostraDados(vetor);
</script>