Help with programming

Hi
I have this running on my Arduino, but I want that when I turn on the Arduino that it turns on all LED for 10 sec as a test that everyone works.

I don't know anything about programming it's a friend who made it for me.

int leds[8] = {6,7,8,9,10,11,12,13};

void setup(){
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
for (int jj; jj<sizeof(leds)/sizeof(int);jj++){
pinMode(leds[jj],OUTPUT);
delay(10);
}
}

void loop(){
digitalWrite(leds[random(0,sizeof(leds)/sizeof(int))],HIGH);
delay(random(20,200));
digitalWrite(leds[random(0,sizeof(leds)/sizeof(int))],LOW);
}

You might want to add a delay() as the last line of code in your loop() function.

Try:

delay(100);

You have 2 options. Either start learning programming or change to another interesting hobby. It's no Woodoo so learning is within range for everybody.
The delay function gives You delays in milliseconds.
Also read "How to use this Forum", #7, telling how to attach code in the best way making it easier for helpers to read it.

To help you understand

In general, Arduino code consists of a setup() function and a loop() function.

The setup() function is only executed once and usually used to initialise things; e.g. pinMode makes that the IO pins are set to a certain mode (OUTPUT in your case).

The loop() function is called time after time and is where one usually places the actual functionality. E.g. switching a LED on or off as in your code.

The digitalWrite switches leds on or off.

"all leds on for 10 seconds" at startup is a once-off operation and can hence go in the setup() function.

You can make use of the existing for-loop where the pins are set to output. Add a digitalWrite to set the pins HIGH (or LOW depending how they are wired) in that for-loop after the pinMode; that will switch all LEDs on.

You can get rid of the delay in that for-loop; it does not make sense.

After the for-loop, add a delay of 10 seconds.

If you want to switch all LEDs off after the 10 seconds, add a second for-loop after the delay and switch the LEDs off. The idea:

void setup()
{
  ...
  ...

  // set pins to output and switch on
  for(int jj; jj<sizeof(leds)/sizeof(int);jj++)
  {
    ...
    ...
  }

  // wait 10 seconds
  ...

  // switch all pins off
  for(int jj; jj<sizeof(leds)/sizeof(int);jj++)
  {
    ...
  }
}