Difference between [] and ()

OK, this is a basic and for you guys probably boring question.\r\rBut what is the difference between [] and (). I used () in the random letters tutorial and it didn’t work. When i used [] it worked. I could not find any helpful info in the flash help. So can anybody on this forum help me?

[] are used for arrays, () are used for most everything else, including functions.

As Upu said, [] are used in arrays, when you want to get a certain element of that array. You can check the best of Kirupa forum for further information about arrays.\rThey are also used to evaluate an expression. But that’s a little bit complicated.\rOn the other hand, () are used in functions, to say that they have a certain number of arguments. For instance if you define the

 function distance (1stargument,2ndargument)

you’ll have to use it so :


You can also find them when you define an array (see other forum).\r\rGood luck\rpom 0]