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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:16:06+00:00 2026-06-13T15:16:06+00:00

While teaching my JavaScript class yesterday, my students and I came across some interesting

  • 0

While teaching my JavaScript class yesterday, my students and I came across some interesting functionality that I thought might be worth capturing in a question and the answer I’ve come to.

Typing Array.length in the JS console in chrome returns 1.

Likewise, Function.length returns 1. This is important because:

Every function in JavaScript is actually a Function object. (MDN JS Ref: Function)

Thus, Object.length and likely all other native objects will and should return 1 as the value of the length property.

So, finally why is this behavior occurring?

  • 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-13T15:16:07+00:00Added an answer on June 13, 2026 at 3:16 pm

    Function.length itself is the answer:

    Specifies the number of arguments expected by the function. MDN JS Ref: Function.length

    When we write Function.length we are asking the Function constructor to tell us the number of formal, named parameters (“optional” – i.e. non-formal – parameters are accessed via the arguments property in the function body). Because the Function constructor expects exactly 1 formal named parameter, the result is 1:

    new Function ([arg1[, arg2[, ... argN]],] functionBody)
    

    functionBody is the single formal named parameter. Therefore Function.length is 1.

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

Sidebar

Related Questions

Teaching myself some c# and my problem is that I have a class which
While reading this class BitmapFactory I noticed that almost all methods inside are static.
One of my friends is teaching a programming class with Javascript and one of
while looking at some code I stumbled onto: throw /*-->*/new std::exception (//... and I
I am teaching myself jquery it seems while working on this project. I assumed
I've been teaching myself F# for a while now. I've read Programming F# by
Thank you for your help yesterday and for teaching me something new as well.
I am teaching myself CUDA with the programming guide that CUDA offers. For practice,
I'm teaching a jr. high/high school web programming class, and we're starting with simple
Ok so I am teaching myself RoR while developing a simple api & web

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.