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: 
JSON.parse is native. That means it's defined in the browser, the implementation of the method is browser implementation specific.

v8 (Chrome) has a C++ method for [`JsonParser::ParseJson`](https://code.google.com/p/v8/codesearch#v8/trunk/src/json-parser.h)

spidermonkey (Firefox) has a C++ function for [`js_json_parse`](http://hg.mozilla.org/mozilla-central/file/964b118ac852/js/src/json.cpp#l90)

JavaScriptCore (Webkit / Safari) has a C++ function for [`JSONProtoFuncParse`](http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/runtime/JSONObject.cpp#L824)

Rhino (Mozilla) has a Java method for [`parseValue`](https://github.com/mozilla/rhino/blob/master/src/org/mozilla/javascript/json/JsonParser.java#L71)

the Opera and IE implementations are closed source. I also think Nitro's implementation is closed source aswell.

Note there are many other JavaScript engines.
It depends on the browser. You view the source of your favorite and see if you can find it there.