This tutorial walks you through implementing a 2D scrolling game in JavaScript.
Grab a piece of paper and try to fold your way out of this problem.