The semicolon denotes vertical concatenation. Separating elements with commas will make a list of those elements, while separating elements with semicolons or spaces will concatenate them — vertically for semicolons, and horizontally for spaces.
As @Tamas_Papp noted, you should probably use 1:10 as is or collect it. But just to answer this question: [1:10] is not a unit range, but rather a vector with the single element 1:10 (which is a UnitRange). [1:10;] is the same as vcat(1:10). vcat returns the concatenated result as an Array, so in this case of a single argument, it simply converts it to an array (the fact that vcat return an Array does not seem to be documented, so I suppose it could just as well have returned its argument 1:10 unmodified).
@yha Yea, I should have and meant to say an Array of 1-element UnitRange. I posted this question on StackOverflow and I got an interesting answer.
Also, my question wasn’t whether I can use collect to simplify things. I am not looking for an answer about how to create arrays from ranges, per se. I wanted to get to the bottom of the syntax. Sorry, I have not made it clear enough.