Talk:MediaWiki Developer's Handbook/Add JavaScript

Can any one explain in more detail how to make script work? In this example do I copy word for word or modify? Once created and set up how do I tell the page to display the script.

What would I put in the mediawiki page itself to get it to display the script?