Functions communicate

Hello unityAnswer community I have a question !!!

My question is, how can I pack the variable in its own function so that the two functions still communicate together.

And my script:

function Start(){
   var randomnumber = Random.Range(1,4);
   if(randomnumber == 1) {
      GetComponent("FPSInputController2").enabled = false;
   }
   if(randomnumber == 2) {
      GetComponent("FPSInputController").enabled = false;
   }
   if(randomnumber == 3) {
      GetComponent("FPSInputController2").enabled = false;
   }
   if(randomnumber == 4) {
       GetComponent("FPSInputController").enabled = false;
   }
}

function Start(){
var randomnumber = Random.Range(1,5);
if(randomnumber == 1 || randomnumber == 3) {
GetComponent(FPSInputController2).enabled = false;
}
else if(randomnumber == 2 || randomnumber == 4) {
GetComponent(FPSInputController).enabled = false;
}
}

Three things I did, first using the OR sign || and second removing the string of the parameters. Using the type is better. Finally, when using integers in the random method, the high value is excluded so I changed it to 5 so that it goes from 1 to 4.