Is there a way to know how test (for regex) or cos (for math) or substring (for string) or splice (for array) have been coded in the exact syntax either by a way in Javascript (like alert(function)
) or by seeking in the files that come with Firefox?
Asked
Active
Viewed 79 times
-1

Jon Adams
- 24,464
- 18
- 82
- 120

user1365010
- 3,185
- 8
- 24
- 43
-
3Cant make sense of your question. Can you elaborate? – Sarfraz May 08 '12 at 16:54
-
You're saying you want to see the implementation of native JavaScript methods? You'd need to view the source files. This is possible with open source implementations. – cliffs of insanity May 08 '12 at 16:56
2 Answers
1
Well, the source code of javascript likely isn't written in javascript itself, so you would be unable to just print it to the browser console or alert.
You can browse the source code of google's V8 engine, and see if it helps you ;)

Tilman Koester
- 1,739
- 2
- 11
- 25
0
These functions are actually implemented differently by browsers in one of the OS native languages.
So these algorithms are written in c, c++, c#, java etc. but not in JavaScript.

Community Driven Business
- 4,622
- 1
- 16
- 20
-
If this post answered your question, please select it as answer – Community Driven Business May 12 '12 at 12:25