Basic LED Array Blink Issue

Hello all, I just got the Arduino Uno Rev 3 and have completed a few beginner projects included with the starter kit mainly involving LED blinks.

I wanted to venture onto the code myself and make 8 lights blink all at the same time (much like the well known "Blink" beginner project). I know all 8 are wired correctly because I just used a pre-configured code to test another project out, so that is not the issue.

I believe it is potentially how i defined my Array? Here is my code:

int ledPins[] = {2,3,4,5,6,7,8,9};

void setup() {

 pinMode (ledPins,OUTPUT);

void loop() {
  digitalWrite (ledPins, HIGH);
  delay (100);
  digitalWrite (ledPins, LOW);

Any help would be much appreciated! Please let me know if I missed any forum etiquette as this is my first time venturing here. Thanks!

Welcome to the forum!

Read this on arrays: