Website error - timed out error on fcc website

Hi there! I’ve been trying to complete my Javascript course since Saturday 9 November. All was working well until I got to a certain section in the basic Javascript module. I constantly get an error when I try to test or run my code. Either I get a test timed out error or an “oops! This web page failed to load” error. I’ve tried clearing cache and cookies, using a different device, using an incognito window.

what’s your code? so we can check that there is nothing wrong there first

The “Basic Javascript: Iterate through an array with a for loop” section. My solution:

var total = 0;
for (var i = 0; i < myArr.length; total++) {
total = total + myVar[i];
} 

I even copied and pasted the solution under the “hints” tab and ran the code. Same problem

It seems to be fine now. I used a different browser

you never increase i, so this is always true, making this an infinite loop

2 Likes