Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7727057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:21:51+00:00 2026-06-01T05:21:51+00:00

What in the world is making the second parameter return true ? WARNING: it

  • 0

What in the world is making the second parameter return true?

WARNING: it will loop infinitely and might crash your browser

for(;;){
    //...
}

I was totally expecting not to loop at all…

But it is running, and that makes it worse since it can only be running if something evaluated to true, or am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:21:53+00:00Added an answer on June 1, 2026 at 5:21 am

    From forMDN

    for ([initialization]; [condition]; [final-expression])
       statement
    

    [Initialization] and [final-expression] are intuitively not required, reducing the construct to a simple while loop. But the relevant part is:

    condition
    An expression to be evaluated before each loop iteration. If this expression evaluates to true, statement is executed. This conditional test is optional. If omitted, the condition always evaluates to true. If the expression evaluates to false, execution skips to the first expression following the for construct.

    (emphasis mine)

    This appears to be a totally arbitrary JS language design decision. If it were my language I would probably throw a syntax error.


    On a playful side note, for(;;){} is equivalent to while(true){}, and happens to be 4 characters shorter. I wonder if minifiers leverage this!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a function that will take a parameter and, among other things,
In the Oracle world, it's been gospel to build your database block size to
I'm attempting to use the MKMapView. I've succeeded in making the world map appear.
I'm making an application with server sided variables that change every second. Every second
I would be making changes to Tomcat's 7 sever.xml file specifically port 8443 to
I'm wondering how i would go about making the following application: a user signs
I would like to start making code patches to Rails. Are there any good
How would i go about making an animation of a rocket move to another
How would I go about making a reference to a UILabel inside a variable?
I am making a Firefox extension and would like to give my users more

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.