swift - Array declaration difference -


this question has answer here:

if have minute; i'm struggling understand difference between 2 declaration. know first 1 create new empty array of type string second declare existing array of type string ? thank you

var array = [string] ()      var array:[string] = [] 

there no difference between declarations - both create empty string array


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -