const int buttonPin = 2;
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
digitalWrite(ledPin, digitalRead(buttonPin));
// shorten the code since buttonPin variable has a value of either LOW or HIGH
}