Only two from my three micro servos are getting randomly chosen. Help!

#include <Servo.h>

Servo myservo1; // create servo object to control a servo
// twelve servo objects can be created on most boards

Servo myservo2; // create servo object to control a servo

Servo myservo3; // create servo object to control a servo

int pos = 0; // variable to store the servo position

void setup() {
myservo1.attach(10); // attaches the servo on pin 10 to the servo object
myservo2.attach(9); // attaches the servo on pin 9 to the servo object
myservo3.attach(8); // attaches the servo on pin 8 to the servo object
}

void loop() {
int randNumber = random(1, 3);
Serial.println(randNumber);

int del = random(1000,16000);
Serial.println(randNumber);

delay (del);

if (randNumber == 1){
// in steps of 1 degree
myservo1.write(90);
}
if (randNumber == 2){
// in steps of 1 degree
myservo2.write(90);
}
if (randNumber == 3){
// in steps of 1 degree
myservo3.write(90);
}

delay(2000);
myservo1.write(pos); // tell servo to go to position in variable 'pos'
myservo2.write(pos);
myservo3.write(pos);/
// waits 15ms for the servo to reach the position
}

Myservo3 never gets randomly chosen!.. can someone explain to me why?

From the reference page on random():

Parameters

min - lower bound of the random value, inclusive (optional)

max - upper bound of the random value, exclusive

You need:

random(1 ,4);

outsider:
From the reference page on random():

Parameters

min - lower bound of the random value, inclusive (optional)

max - upper bound of the random value, exclusive

You need:

random(1 ,4);

I am new to this.. can you please explain to me in more detail.

random(1, 3);

will return 1 or 2

random(1, 4);

will return 1, 2 or 3

See https://www.arduino.cc/en/Reference/Random

UKHeliBob:

random(1, 3);

will return 1 or 2

random(1, 4);

will return 1, 2 or 3

See https://www.arduino.cc/en/Reference/Random

Thank you so much..