This is some general feedback for the authors of the JavaScript API Samples pages.
There is often poor consistency between the samples, making it unnecessarily harder to copy/paste samples together as you're learning.
For example, the Feature Layer (On Demand Mode) sample uses: var mapLayers = []; //array of layers in client map
The Time Slider With Dynamic Data sample uses: var layers = [];
This means you can't simply copy/paste code between samples, but have to debug it laboriously. This is a simple example, but it's repeated throughout the samples.
By contrast, the SilverLight samples are more consistent, meaning it's easy to copy/paste an item like the Overview map, to add to your growing sample application.