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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:22:45+00:00 2026-06-06T12:22:45+00:00

I tried to investigate the jQuery code, so I used this: document.write($.constructor); jsfiddle I

  • 0

I tried to investigate the jQuery code, so I used this:

document.write($.constructor);

jsfiddle

I got this result:

function Function() { [native code] }

What does [native code] mean? Why can’t I see the real code?

Tested with Google-Chrome

  • 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-06T12:22:47+00:00Added an answer on June 6, 2026 at 12:22 pm

    When you define functions in an interpreted language (as opposed to a compiled language). You have access to the file / string / text that defines the function.

    In JavaScript for example you can read the definition body text of a function you have defined:

    function custom( param ){
      console.log( param );
    }
    
    console.log( custom.toString() ); // <- Will display the full code (in text) of the function. 
    

    If you try to do the same for a function that is included by construction* in JavaScript it is not implemented as text but as binary.

    console.log( setInterval.toString() );
    
    // Will display: function setInterval() { [native code] }
    

    There is no reason to show the binary code that implements that function because it is not readable and it might not even be available.

    jQuery extends default JavaScript behaviour. It’s one of the reasons it was so highly appreciated and praised as opposed to Prototype.js for example. Prototype was altering the natural behaviour of JavaScript creating possible inconsistencies when using Prototype alongside some other piece of code that relied on normal functionality.

    tl;dr:

    jQuery extends JavaScript, there is functionality implemented using native code (which performance wise is a good thing).


    *included by construction: Elaborating a bit on this part. JavaScript itself can be written/implemented in any language (C++, Java, etc.). In Chrome, the JavaScript engine (V8) is written in C++. Firefox’s JavaScript engine (SpiderMonkey) is also written in C++.

    The functions that are defined by the language specification (ECMAScript) and should be included in the actual implementation, are written in another language (e.g. C++ in these 2 cases) and become available in JavaScript as built-in/native functions.

    These functions are actually compiled (binary) C++ code and thus cannot be displayed within JavaScript itself, e.g. using the [].map.toString() syntax.

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

Sidebar

Related Questions

Tried this: $('.link').click(function(e) { $.getScript('http://www.google.com/uds/api?file=uds.js&amp;v=1.0', function() { $('body').append('<p>GOOGLE API (UDS) is loaded</p>'); }); return
I'm trying to add an image to an SVG file.. I tried this code::
tried to search for this, although I am not even sure what I am
I am requesting with AJAX (using jQuery) a tag which contains a Javascript function
I'm having severe memory issues in my application [1]. In order to investigate this,
I have to investigate a certain process which involves several (unknown at this point)
tried to write a program which logs me in automatically in a webbrowser in
I was provided this simple C++ [I think] program to investigate the maximum size
I have .NET and C++ implementations of a perf test function that does 854,750
This question might be a bit sketchy because I do not have the code

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.