trying to test pushbutton

mike,

thanks but im a little confused. how can i do a digitalWrite to a pin that ive set as an input?

im guess this pull up resister is what makes this possible. but how can i test the pushbutton this way?