Can an array have new elements added to it on the fly?

you’re looking for push!(x, x[end]+sh).

3 Likes