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?
-
3Cant make sense of your question. Can you elaborate?Sarfraz– Sarfraz2012-05-08 16:54:44 +00:00Commented May 8, 2012 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– cliffs of insanity2012-05-08 16:56:30 +00:00Commented May 8, 2012 at 16:56
Add a comment
|
2 Answers
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 ;)
Comments
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.
1 Comment
Community Driven Business
If this post answered your question, please select it as answer