Longest positive subarray

Array A[] contains only ‘1’ and ‘-1’

Construct array B, where B[i] is the length of the longest continuous subsequence starting at j and ending at i, where j < i and A[j] + .. + A[i] > 0

Why [1:2] != Array[1:2]

I am learning Julia following the Wikibook, but I don’t understand why the following two commands give different results:

julia> [1:2]
1-element Array{UnitRange{Int64},1}:
1:2

julia> Array[1:…