How can i turn on led when blynk connected or not?

how can i do that?

led1=pin2 //connected , maybe blue color
led2=pin3 //disconnect ,maybe red color
if blynk.connected(){
digitalwrite(led1,high);
digitlawrite(led2,low);
}else{
digitalwrite(led1,low);
digitalwrite(led2,high);
}

  Blynk.begin(auth);
  while (Blynk.connect() == false) {
       // Wait until connected
  }
  digitalwrite(led1,high);
  digitlawrite(led2,low);
1 Like

thankyou…