TD interview question

Walk through a small javascript function