# How do I initialize an empty array / vector of strings, and then push strings into

**URL:** <https://discourse.julialang.org/t/how-do-i-initialize-an-empty-array-vector-of-strings-and-then-push-strings-into/56980>\
**Category:** General Usage\
**Created:** [March 11, 2021, 10:39pm UTC](https://discourse.julialang.org/t/how-do-i-initialize-an-empty-array-vector-of-strings-and-then-push-strings-into/56980 "2021-03-11T22:39:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [March 11, 2021, 11:32pm UTC](https://discourse.julialang.org/t/how-do-i-initialize-an-empty-array-vector-of-strings-and-then-push-strings-into/56980/2 "2021-03-11T23:32:43Z")

</div>

```julia
julia> t = String[]
String[]

julia> push!(t,"a string")
1-element Array{String,1}:
 "a string"

julia> t
1-element Array{String,1}:
 "a string"

```

Another way

```julia
julia> w = Vector{String}()
String[]

julia> push!(w,"another string")
1-element Array{String,1}:
 "another string"

julia> w
1-element Array{String,1}:
 "another string"

```

---

_[View the full topic](https://discourse.julialang.org/t/how-do-i-initialize-an-empty-array-vector-of-strings-and-then-push-strings-into/56980)._
