Problem description:
Trying to use .lenght to count the size of an array to reproduce a list, but the command doesn’t work.
Expected behavior:
Print a list with the elements inside array.
Actual behavior:
Nothing happens.
Steps to reproduce:
const colorido = [“Azul”, “Amarelo”, “Verde”, “Vermelho”];
let indice = 0;
while (indice < colorido.lenght) {
console.log(colorido[indice]);
indice++;
}
Bug appears at this link:
https://replit.com/@MarceloSiriaki/testing-for#index.js
Browser/OS/Device:
Chrome