For examples I think it's nicer to bundle the JS into the index.html so that viewers and digest suggested HTML, CSS and JS usage all in one place.