Assistance with an if statement having two conditions

Could someone please answer the following question for me related to the code below?

Why does "The sky is blue" get serial printed over and over again when I run this code? A ask this question because it seems to me that both conditions of the if statement are only satisfied once. State becomes "Off" the first time both conditions are satisfied and that should be it. But the statement continue to print out.

//***********************************

unsigned long currenttime = 0;
unsigned long previoustime = 0;
long duration = 200;
String State = "On";

void setup(){
Serial.begin(9600);
}

void loop(){

currenttime = millis();

if((currenttime - previoustime >= duration) && (State = "On")){
Serial.println("The sky is blue");
previoustime = currenttime;
State = "Off";
}
}

//****************************************

Thank you!

First problem ==

Dumb error! I know better than that.
Thank you!

the compiler will flag an error when using "=" instead of "==" in a condition test if the constants are on the left hand side (LHS)

#define DURATION    200
  if((DURATION <= currenttime - previoustime) && ("On" == State)){

the compiler will flag an error when using "=" instead of "==" in a condition test if the constants are on the left hand side (LHS)

Whilst that is true, I have more trouble working out what is being tested when expressed with the constant on the left than I do in remembering to use == in the first place, and, of course, it does not work when comparing variables

As far as possible I like to be able to read code like natural language, so where in English I would say "if the state is On then do something" then putting the variable first makes sense (to me at least) whereas the other way round "like Yoda seems"

Each to his/her own, of course

it's a minor compromise that can save hours of debugging

Doesn't the compiler normally issue a warning when an assignment is in a conditional expression?