I am playing with this basic example:
There're a lot of existing questions about why to connect button to the ground. I get the idea more or less. Is done to avoid "noise" during reading the input value.
However, what I don't understand is why to use resistor instead of a wire? If I remove resistor and put the wire instead the example stops working. Could someone explain me this?