How to initialize an empty 1x2-dimensional row-array in Julia?

Not exactly sure what you want, but would this work for you?

Array{Int,2}(undef, 1, 0)

x = Array{Int,2}(undef, 1, 0)
for i in 1:10
    global x = hcat(x, i)
end
x
1×10 Array{Int64,2}:
 1  2  3  4  5  6  7  8  9  10
3 Likes