Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,186,814 members, 7,930,790 topics. Date: Sunday, 25 August 2024 at 08:40 AM

Loop Keep Running Non Stop, Past Counter..? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Loop Keep Running Non Stop, Past Counter..? (287 Views)

Did You Really Code 5hours+ Non Stop While Learning To Code? / Using For Loop And Createelement() To Print Out Array Content In Javascript / Google Rewards Teenager $36,000 For Finding Security Loop In Their System (2) (3) (4)

(1) (Reply) (Go Down)

Loop Keep Running Non Stop, Past Counter..? by Edipet(m): 9:36pm On Aug 05, 2023
I wrote down one line one of for loop code, when I logged into the console, it keep going, past counter, it was even going to infinity., I comment out the code but it was still running. I had to force off the laptop. Now all my html file are gone.
What could be the problem.? This is the second time this has happen to me?
Re: Loop Keep Running Non Stop, Past Counter..? by lordm(m): 9:43pm On Aug 05, 2023
Edipet:
I wrote down one line one of for loop code, when I logged into the console, it keep going, past counter, it was even going to infinity., I comment out the code but it was still running. I had to force off the laptop. Now all my html file are gone.
What could be the problem.? This is the second time this has happen to me?
check you conditions
Re: Loop Keep Running Non Stop, Past Counter..? by SUPREMOTM: 2:07am On Aug 06, 2023
Edipet:
I wrote down one line one of for loop code, when I logged into the console, it keep going, past counter, it was even going to infinity., I comment out the code but it was still running. I had to force off the laptop. Now all my html file are gone.
What could be the problem.? This is the second time this has happen to me?

Paste your code here, let's check it.
Re: Loop Keep Running Non Stop, Past Counter..? by peanutbutterr: 4:57am On Aug 06, 2023
you didn’t add the “break” keyword after your condition. that’s why you have an infinite loop running.
Re: Loop Keep Running Non Stop, Past Counter..? by ManAdii: 7:08am On Aug 06, 2023
Why did you force shutdown the system when you should have killed the process?
Re: Loop Keep Running Non Stop, Past Counter..? by Edipet(m): 8:34am On Aug 06, 2023
lordm:
check you conditions
thanks. The increment counter variable was wrong. Wrote "i = i++ instead of i = i + 1 or i++
Re: Loop Keep Running Non Stop, Past Counter..? by Edipet(m): 8:34am On Aug 06, 2023
peanutbutterr:
you didn’t add the “break” keyword after your condition. that’s why you have an infinite loop running.
thanks. The increment counter variable was wrong. Wrote "i = i++ instead of i = i + 1 or i++
Re: Loop Keep Running Non Stop, Past Counter..? by Edipet(m): 8:35am On Aug 06, 2023
SUPREMOTM:


Paste your code here, let's check it.
corrected thanks
Re: Loop Keep Running Non Stop, Past Counter..? by Edipet(m): 8:37am On Aug 06, 2023
ManAdii:
Why did you force shutdown the system when you should have killed the process?
correct. But i think it has caused problem to my VS code

(1) (Reply)

From Concept To Market: Streamlining The Product Development Process / Top 10 Tech Skills In Demand In 2024 / Comptia Certification Vs AWS

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.