first half of the JavaScript tutorial