Errors asking for Semicolons in strange places

When I put the line of code

var Sprite[] sprites = Resources.LoadAll("SpriteSheet");

in my start function, it throws the error:

Assets/Contoller.js(40,21): UCE0001: ';' expected. Insert a semicolon at the end.

and

Assets/Contoller.js(40,19): UCE0001: ';' expected. Insert a semicolon at the end.

I took this line of code for the sprite loading solution over here

So I have no idea why it wont work for me. Why does it interpret this as needing semicolons?

If this is C#, then you need the code at the link:

Sprite[] sprites = Resources.LoadAll("SpriteSheet");

If this is Javascript, then you need to do:

var sprites : Sprite[] = Resources.LoadAll("SpriteSheet");