Creating a board and naming each piece.

Imagine you are creating a board. a chess board. Instantiating. where you would want each square to have a number. first square that's created has number 1 in it's script (var number = 1;) second - 2, third 3 etc. How would you pull that trick, I'm curious.

you can access your instantiated object parameters like this:

for (i=0; i<10 ; i++){

  var go : GameObject = Instantiate (prefab);
  go.GetComponent(yourScript).number = i;

}