Nested loops

The little script below is from the examples in the IDE. How would I make this work using two buttons and two LED's?
IE.
button 1 triggers LED 1
and
button 2 triggers LED 2.

I'm not expecting anybody to write my code for me but would appreciate a push in the right direction please.

const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);      
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);     
}

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {     
    // turn LED on:    
    digitalWrite(ledPin, HIGH);  
  } 
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW); 
  }
}

You just need another if statement to digitalRead from the other button and digitalWrite to the other LED. What part is confusing you?

I actually have a have a complex countdown timer script that holds a relay and lets it go when it reaches zero. Answer was nowhere until I stood back to read your reply, then... PING

Thank you.

You can simplify the example ‘loop’ quite a bit:

void loop() {
    digitalWrite(ledPin, digitalRead(buttonPin));  
}

Then extend it to two sets of inputs and outputs:

void loop() {
    digitalWrite(led1Pin, digitalRead(button1Pin));  
    digitalWrite(led2Pin, digitalRead(button2Pin));  
}

Once you go beyond 2 or 3 sets it’s time to switch to arrays:

const byte SetCount = 5
const byte ButtonPins[SetCount] = {2, 3, 4, 5, 6};
const byte LEDPins[SetCount] = {7, 8, 9, 10, 11};
void loop() {
    for (byte i=0; i<SetCount; i++) {
        digitalWrite(LEDPins[i], digitalRead(ButtonPins[i]));  
    }
}