We can snigger - but OP, you will too in a few weeks, once you understand the language and syntax of the commands!
EDIT: Added OP's original code listing - as CODE !
/* sketch 3
turn on a LED when the button is pressed and let it on
until the button is pressed again
*/
int pinButton = 5;
int pinButton = 6;
int pinButton = 8;
int LED2 = 2;
int LED4 = 4;
int LED7 = 7;
int stateLED2 = LOW;
int stateLED4 = LOW;
int stateLED7 = LOW;
int stateButton5;
int stateButton6;
int stateButton8;
int previous5 = LOW;
int previous6 = LOW;
int previous8 = LOW;
long time = 0;
long debounce = 200;
void setup() {
pinMode(pinButton5, INPUT);
pinMode(pinButton6, INPUT);
pinMode(pinButton8, INPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
}
void loop() {
stateButton = digitalRead(pinButton5);
stateButton = digitalRead(pinButton6);
stateButton = digitalRead(pinButton8);
//LED 2
if(stateButton5 == HIGH && previous5 == LOW && millis() - time > debounce) {
if(stateLED2 == HIGH){
stateLED2 = LOW;
} else {
stateLED2 = HIGH;
}
time = millis();
}
// LED 4
if(stateButton6 == HIGH && previous6 == LOW && millis() - time > debounce) {
if(stateLED4 == HIGH){
stateLED4 = LOW;
} else {
stateLED4 = HIGH;
}
time = millis();
}
// LED 7
if(stateButton8 == HIGH && previous8 == LOW && millis() - time > debounce) {
if(stateLED7 == HIGH){
stateLED7 = LOW;
} else {
stateLED7 = HIGH;
}
time = millis();
}
digitalWrite(LED2, stateLED2);
digitalWrite(LED4, stateLED4);
digitalWrite(LED7, stateLED7);
previous == stateButton5;
previous == stateButton6;
previous == stateButton8;
}