Background
The JavaScript Object Model was introduced in SharePoint 2010. It exposes on the client side many of the objects that were previously only accessible through server-side code or through dedicated web services.
Embedding JavaScript in SharePoint Pages
In SharePoint 2013 you can put yo...