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 7004253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:10:31+00:00 2026-05-27T21:10:31+00:00

Could someone possibly take a look at this: http://jsfiddle.net/VkFRU/4/ and explain the console output

  • 0

Could someone possibly take a look at this:
http://jsfiddle.net/VkFRU/4/

and explain the console output I’m seeing (which is “0”, “true”, “false” and “덜 읽기”)?

The four individual console.log() calls output exactly what I expect, except for the the first one. Why is it saying length is 0?

The one in the $.each() iterator doesn’t output anything. Why not?

  • 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-05-27T21:10:31+00:00Added an answer on May 27, 2026 at 9:10 pm

    The four individual console.log() calls output exactly what I expect, except for the the first one. Why is it saying length is 0?

    Only numerical properties are taken into account for length. 'ko' is not numerical.

    From the specification:

    The length property of this Array object is a data property whose value is always numerically greater than the name of every deletable property whose name is an array index.

    Where array index is defined as:

    A property name P (in the form of a String value) is an array index if and only if ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal to 232−1.

    Therefore ko is not an array index.

    The one in the $.each() iterator doesn’t output anything. Why not?

    Because jQuery recognizes the arguments as array an iterates over its values, probably in this way:

    for(var i = 0; i < arg.length; i++)
    

    You already noticed that translations.length is 0.


    You are making the mistake to use an array as associative array. Use an object instead:

    var translations = {};
    translations['ko'] = {}; 
    

    The reason why you can assign non-numerical properties to arrays is simply the fact that arrays are objects too. But that does not mean that you should use them as such. The special array methods don’t apply to non-numerical properties.

    I’d suggest you read more about arrays in the MDN JavaScript Guide.

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

Sidebar

Related Questions

Maybe I'm having a really bad day, but could someone possibly help me to
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
Could someone explain to me in simple terms the easiest way to change the
Could someone please tell me which objects types can be tested using Regular Expressions
could someone help me to figure out if it is possible to take part
Could someone guide me on what path/steps to take to create a simple bootable
Could someone recommend any good resources for creating Graphics User Interfaces, preferably in C/C++?
Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface
Could someone write-up a step by step guide to developing a C++ based plugin
Could someone please demystify interfaces for me or point me to some good examples?

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.