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

  • SEARCH
  • Home
  • 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 8765255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:14:10+00:00 2026-06-13T16:14:10+00:00

I searched for this question but the answers I got not solve my question

  • 0

I searched for this question but the answers I got not solve my question . Here is my question , I have a array with 10 members .

Js Code

var array = [1,2,3,4,5,6,7,8,9,10];

Loop 1:

for(var i=0,len=array.length;i<len;i++){};

Loop 2

var len = array.length;
for(var i=0;i<len;i++){};

Loop 3

for(var i=0;i<array.length;i++){}

I know there is a major performance difference between 1 and 3 . But , is there any performance difference between 1 and 2 ? .

  • 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-13T16:14:11+00:00Added an answer on June 13, 2026 at 4:14 pm

    There shouldn’t be any noticeable difference, although the parsing logic has one more token to parse in example 2.

    Shorter is better: var a,b,c,d; should be faster than

    var a; var b; var c; var d;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched through google and SO for possible answers to this question, but
Apologies, but I have searched and read previous answers on this question but couldn't
I've searched around for answers to this question, but not found anything quite on
I have already searched from this question in SO. But none of the answers
I have searched on stack but no question or answer answers this question directly
I realize this is a basic question but I have searched online, been to
I've searched for this question but I only come across really specific answers that
I have searched this server for the answer to this question but I haven't
I searched the forums but didn't find any answers to this question. I am
Hello I searched for an answer to this question but didn't find any here.

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.