As front-end web developers we write code every day. Although we are usually working on one major project, our heads have to be ready to switch between different projects and other tasks at a moments notice.
Some people are naturally better at switching than others, but none the less switching is not something that we think about as we do it. I recently wrote 'How can front-end developers work more effectively?' which explores the problems and some code solutions.