The samples are included in the latest WebViewer download package.
Unzip the download package and copy the unzipped folder to your server.
samples-key.js file and replace the empty string with your license key.
window.sampleL = 'YOUR_LICENSE_KEY_HERE';
Assuming you've copied it to the root of your server you can navigate to it, for example if you're on port 8000 localhost:8000/WebViewer/samples.html.
Use the buttons at the top of the page to toggle between PDF/Office samples and XOD (Universal) samples. Most of the samples are the same but there are a few PDF specific samples and a few XOD specific ones.
Click on any of the sample links to run them in the browser.
All of the code for each sample is found in the samples folder if you want to inspect or modify it.