FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Basic About While Loop in Javascript
NewsProgramming Languages

Basic About While Loop in Javascript

via Dev.to TutorialDeva I3h ago

WHILE LOOP: ✓ While loop is a control flow statement that is used to execute a code repeatedly when the specified condition is true. ✓ If the condition is false then the code is stop and breaks the loop. ✓ If the condition never becomes false then the code will runs repeatedly.This is called infinite loop. SOME EXAMPLE PROGRAM FOR WHILE LOOP: 1.Print 1 2 3? let i = 1; while (i <= 3) { console.log(i); i++; } ✓First take the initial value i = 1; ✓Then give the condition , our final value is 3, so take the value less than 3. ✓ Print the value of i. ✓Then increment the value of i. WORKING: First the initial value starts 1 2.Then check the condition it's executes when the condition evaluates true. 3.Then prints the initial value 1 i is 1 (1 <= 3 is true). Prints 1, then i becomes 2. 4.i is 2 (2 <= 3 is true). Prints 2, then i becomes 3. 5.i is 3 (3 <= 3 is true). Prints 3, then i becomes 4. 6.Then checks i is 4. But 4 <= 3 is false,so the loop will stop. 2.Print 3 2 1? let i = 3; While(i >=

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles

LeetCode Solution: 1009. Complement of Base 10 Integer
News

LeetCode Solution: 1009. Complement of Base 10 Integer

Dev.to Tutorial • 3h ago

SaaS Boilerplates: What They Are, And 10 of the Best
News

SaaS Boilerplates: What They Are, And 10 of the Best

SitePoint • 3h ago

I replaced all my chargers with this 205W GaN adapter - now I never travel without it
News

I replaced all my chargers with this 205W GaN adapter - now I never travel without it

ZDNet • 4h ago

Anthropic just introduced the Claude Architect Certification — and it’s not easy.
News

Anthropic just introduced the Claude Architect Certification — and it’s not easy.

Medium Programming • 4h ago

Claude Code Has 58 Tips. They’re Not a Menu. Here’s the Stack.
News

Claude Code Has 58 Tips. They’re Not a Menu. Here’s the Stack.

Medium Programming • 4h ago

Discover More Articles