Can't declare a variable.

I wrote this code to test random numbers and don't understand what's wrong with it. I keep getting this error:
"exit status 1
'ran' was not declared in this scope"
Here is my entire code:
"void setup() {
// put your setup code here, to run once:
digitalWrite(LED_BUILTIN, LOW);

randomSeed(analogRead(0));
int randomNumber;
};

void loop() {
// put your main code here, to run repeatedly:
randomNumber = random(1,4);

if (randomNumber = 1)
{ digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
};
if (randomNumber = 2)
{ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);// wait for a second
};
if (randomNumber = 3)
{ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);// wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);// wait for a second
};
if (randomNumber = 4)
{ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);// wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);// wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500);// wait for a second
};
delay(6000)
};

}" Thanks if you have any idea what's wrong. I don't know much about this but from what I googled this should work.

Firstly, you don't put ; after } as you do in a number of places...

    };

And you have declared randomNumber (not "ran" though?) inside setup() which means it can't be seen inside loop(). Declare it as a so-called global variable above setup().

And once you lose all those spurious ; after the }, you have an extra } at the end, and a missing ; after that last delay().

Then once it compiles you need to read up on how not to use = in an if:

if (randomNumber = 3)

but from what I googled this should work.

I think your Google is broken.