so i have 2 arrays (server_name and server_state). Now i want to check the server_state array if there is a 0,1,2,3. So the possible numbers are 0,1,2 or 3. Something like
var server_state = [1, 0, 3, 2];
var server_name = [server1, server2, server3, server4];
Now i want to save the POSTITION of the number if it is 0,1,2 or 3 and save the position in a variable so that i can go into the array server_name and get the servername of the position like the number is. And these two infos (state so 0,1,2 or3 AND the server name should be saved in two other variables so i can use them later. Do you have any ideas about that? Maybe with a for and a if? It is known how long the array is...
Aucun commentaire:
Enregistrer un commentaire