Skip to content

Commit

Permalink
fix: add missing whitespace (#814)
Browse files Browse the repository at this point in the history
No whitespace between sentences since a6c085d .
  • Loading branch information
adam-sroka authored Oct 23, 2024
1 parent d9b5ccb commit d9f03be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arrays-and-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func SumAll(numbersToSum ...[]int) []int {
Lots of new things to learn!

There's a new way to create a slice. `make` allows you to create a slice with
a starting capacity of the `len` of the `numbersToSum` we need to work through.The length of a slice is the number of elements it holds `len(mySlice)`, while the capacity is the number of elements it can hold in the underlying array `cap(mySlice)`, e.g., `make([]int, 0, 5)` creates a slice with length 0 and capacity 5.
a starting capacity of the `len` of the `numbersToSum` we need to work through. The length of a slice is the number of elements it holds `len(mySlice)`, while the capacity is the number of elements it can hold in the underlying array `cap(mySlice)`, e.g., `make([]int, 0, 5)` creates a slice with length 0 and capacity 5.

You can index slices like arrays with `mySlice[N]` to get the value out or
assign it a new value with `=`
Expand Down

0 comments on commit d9f03be

Please sign in to comment.