You're defining the pin number, not the value read from or written to that pin.
You can say "if (pin3 == HIGH)", there's nothing in the language to stop you, but it is futile because, for the foreseable future, the number 3 never will be equal to 1 (aka HIGH).
You need to read the value (state) of the hardware asset represented by "pin3" and not the variable "pin3" itself.
Im guessing this is where you were goin with the code(?):
//Define constants (assigning names to pin numbers; values wont change)
const int pin3 = 3;
const int pin5 = 5;
const int LEDPin8 = 8;
const int LEDPin11 = 11;
//Variables (values that will change)
int pin3var = 0; //assign variables for pin3 and pin5
int pin5var = 0;
int prev1 = LOW;
int prev2 = LOW;
void setup(){
// declaration of pin modes
pinMode(pin3, INPUT);
pinMode(pin5, INPUT); //Put the digitalWrites in void loop()
pinMode(LEDPin11, OUTPUT);
pinMode(LEDPin8, OUTPUT);
// begin sending over serial port
Serial.begin(9600);
}
void loop(){
digitalWrite(pin3, HIGH);
digitalWrite(pin5, LOW); //Did you mean to put digitalWrite(pin3, HIGH); digitalWrite(pin3, LOW); when it was in the void setup()?
pin3var = digitalRead(pin3);
pin5var = digitalRead(pin5);
if (pin3var == HIGH) {
prev1= LOW;
}
else {
prev1 == HIGH;
}
digitalWrite(LEDPin8, prev1); //digitalWrite LEDpin8 whatever prev1 is.
//pinMode is for setup that determines if the pin is an input or output
if (pin5var == LOW)
{
prev2= HIGH ;
}
else {
prev2 == LOW;
}
digitalWrite(LEDPin11, prev2);
}