Random fiddling with Javascript from reading Eloquent Javascript on my train ride into the city