Dias Mashikov
diasmashikov.bsky.social
Dias Mashikov
@diasmashikov.bsky.social
On the journey to $5,000/m SaaS 🚀 | Sharing insights on Software Engineering, Golang, Backend, Freelance & SaaS | Prev SWE @ PayPal & UPMC
Do you know Go?

array := [4]int{5, 6, 7, 8}
x := array[:]

Is x a valid slice?

A) x is a valid slice.
B) x is still an array of size 4
C) Compilation Error
February 1, 2025 at 4:53 PM
Understanding minor details is crucial to mastering your language

What will this print?

var slice_with_values = make([]int, 5)
slice_with_values = append(slice_with_values, 121) fmt.Println(slice_with_values)

A) [0 0 0 0 0 121]
B) [0 0 0 0 0 0 121]
C) [0 0 0 0 0]
D) [121]
February 1, 2025 at 4:26 PM