Turning multiple pins High on a Nano.

A beginners question from a beginner. Code is written to scroll through pins 2,3,4,and 5. What coding is necessary to turn all 4 high at one time?? I told you this was basic. Thanks.

int pin[4]={2,3,4,5};
int ledTimeOn=350;
int ledTimeOff=350;

void setup()
{
for(int p = 0; p<4; p++)
{
pinMode(pin[p], OUTPUT);
}
}
void loop()
{
for(int p=0; p<4; p++) // these will scroll on and off
{
digitalWrite(pin[p], 1);
delay(ledTimeOn);
digitalWrite(pin[p], 0);
delay(ledTimeOff);
}

}

In the simplest form, use two for loops, one to switch on and one to switch off; no delays in those loops.

In between, add your ON delay.
At the end of loop(), add your OFF delay.

This will not result in exactly at the same time, but for e.g. leds you will not notice the difference.

If by "at one time" you mean simultaneously within a few hundreds of nano seconds you could look at direct port manipulation. You don't even need a loop then.
You set the data direction register and the port register.

sterretje:
In the simplest form, use two for loops, one to switch on and one to switch off; no delays in those loops.

In between, add your ON delay.
At the end of loop(), add your OFF delay.

This will not result in exactly at the same time, but for e.g. leds you will not notice the difference.

Thank You, works like a charm.
/*
Pins are neutral until declared as Outputs and
told to go high(1) or low(0)
*/

int pin[4]={2,3,4,5};
int ledTimeOn=350;
int ledTimeOff=350;

void setup()
{
for(int p = 0; p<4; p++)
{
pinMode(pin[p], OUTPUT);
}
}
void loop()
{
for(int p=0; p<4; p++) // these will scroll on and off
{
digitalWrite(pin[p], 1);
delay(ledTimeOn);
digitalWrite(pin[p], 0);
delay(ledTimeOff);
}
for(int p=0; p<4; p++)
{
digitalWrite(pin[p], 1);
}
{
delay(ledTimeOn);
}
for(int p=0; p<4; p++)
{
digitalWrite(pin[p], 0);
}
{
delay(ledTimeOff);
}
}