Where does source code for JavaScript itself live? [closed]
Andrew Henderson
I don’t know if this is a silly question. But if I want to see and even contribute to JavaScript itself where would I go? I briefly came across but not sure if this is the right place.
I want to actually see the implementation of maybe something like .toString() to see the code behind it all.
41 Answer
The official specification lives here. While it's not source code exactly, it thoroughly describes all logic that a JavaScript engine should implement.
There is no one place for the actual code that runs JavaScript on machines because there are many different JavaScript engines.
There's V8, which Chrome-related browsers (and modern Edge) run on. Its source can be found here.
There's Spidermonkey, which Firefox runs on.
There's WebKit that Mac apps run on, which is built in the JavaScriptCore JS engine. And there are more.
If you want to "contribute to JavaScript itself", contributing to the specification proposals is the way to go - once something is in the spec, it's up to the various JavaScript engines to implement it (which their various maintainers are happy to do, even though it sometimes doesn't occur in a timely fashion).
If you contribute to the development of one of the engines, you'll be improving that engine, but not the entire worldly JavaScript environment.
2