blink without delay with random function

So i tried to integrate blink without delay with the random function but the LED seems to be turning itself off as soon as it turns on. i have an idea where the problem is in the code but i need guidance to fix it.

testing_blink_without_delay.ino (680 Bytes)

Try this:

const int ledPin = 10;
int ledState = false;            
unsigned long previousMillis = 0;  

void setup() {
  randomSeed(analogRead(0));
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  unsigned long randomflash = random(0, 1000);
  unsigned long currentMillis = millis();
  
  Serial.println(randomflash);
  
  if(currentMillis >= (currentMillis + randomflash)) {
    previousMillis = currentMillis;
    if(ledState) {
      ledState = false;
    }
    else {
      ledState = true;
    }
    digitalWrite(ledPin, ledState);
  }
}