Tell us what’s happening:
i keep getting the reply that ‘i’ is read only what could be the the issue here your issue in detail here.
Your code so far
// Setup
const myArray = [];
// Only change code below this line
const i = 5;
while (i <= 5) {
myArray.push(i);
i++;
}
console.log(myArray);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; YAL-L21) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36 EdgA/111.0.1661.59
Challenge: Basic JavaScript - Iterate with JavaScript While Loops
Link to the challenge: