Update samples.js

traversing the DOM