Question: PHP funcitons are written in C and you can look at the source code if you like. For example here - 
[session\_start source](http://lxr.php.net/opengrok/xref/PHP_5_3/ext/session/session.c#1361)

What about with Javascript? How are functions like JSON.parse implemented? Where can I go to view the source?

Thanks!

Answer: 
Each JavaScript engine that supports it will have its own implementation of `JSON.parse`. You can view the code of the various open source engines ([V8](http://code.google.com/p/v8/), [SpiderMonkey](https://developer.mozilla.org/en/SpiderMonkey)) in their respective repositories. You can also view a JavaScript implementation on [Crockford's github page](https://github.com/douglascrockford/JSON-js/) (Crockford being the person who came up with [JSON](http://json.org)) — actually, more than one; there's a version that's a state machine, and another that's a recursive descent parser, and another that relies on `eval` (which is kind of cheating). There are also various implementations in various languages linked from the [JSON home page](http://json.org).
It depends on the browser. You view the source of your favorite and see if you can find it there.