MorganS:
You will see very old Arduino code where they do sometimes write HIGH to an input. This turns on the pullup resistor built into the input circuit. The modern method is to use pinMode(pin_name, INPUT_PULLUP);
ahh i seem to be getting it. thank you so much sir
GarethMoffatt:
What you apear to have said is that you want pin 2 to read the status of pin 4. Is that correct?If so, did you connect them together with a piece of wire?
yes, i do want to read the status of pin 2. but i didnt connect it together to check if the 'if (condition)' works