Why did my code work before and now suddenly stop?

The loop is a bit advanced for me. I’m very new to JS. I’ve only had experience in basic and it’s only for HVAC application. I don’t even understand the syntax fully yet.