Code samples for the forthcoming "Key Concepts for Using the New Office.js APIs" book. For more information, see http://michaelzlat.com/officejs.
The samples can be pasted into the API Tutorial Add-in, available free from the Office Store.
Each sample comes with a "setup" script (that will populate the needed data, etc.), and the actual script shown in the book.