This tutorial walks you through implementing a 2D scrolling game in JavaScript.
If there is a 50% chance something will go wrong, then 9 times out of 10 it will.