-2

Is there any way to see the native code of javascript build-in functions in browser console so I can Know the algorithm efficiency of the function and how it actually works

enter image description here

3

1 Answer 1

6
  1. Ensure you are using an open source browser (or get a job where you get access to the source code of the browser you are using)
  2. Look through that source code of that browser

Native code is program source code that has been compiled to native machine code. The source code isn't on your system unless you get it from some other source. It certainly isn't available to JavaScript.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for info. Are they coded up functions native code in C or C++ also why not in javascript ?
Any native code is generally going to be in C/C++ or some other systems language for the simple reason of performance. At a theoretical level, interpreted languages must, at some point, be executed via a compiled language. JavaScript can technically be compiled, but is generally interpreted for safety reasons (though some engines compile certain portions that are considered safe).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.