Find the Length of an Array/Slice
·
102 words
·
1 minute read
With Go, you can find the length of an array (or more accurately a slice) by using the internal len() function. Our example shows us creating a slice and then printing out it’s length, then adding an extra item and printing the length again.
|
|