When looking at the examples, you don't want the ones that mention 'web map'. That is not a generic term, it means something in particular. A Javascript webmap IS ArcGIS.com. You'll need to look to some of the other samples to use your own map services that hosted locally. A web map encapsulates several things, the combination of layers you have, the information tags that come up when you click etc. You can't simply replace a few lines of code for 'webmap' and replace them with the Javascript 'map' object, which is basically a blank canvas.
ESRI has a lot of cool web map templates to use, mostly based on ArcGIS.com hosted web maps. If you don't want use that environment, you'll need to pass over those and look for other examples.