Knowledge check

Completed

Answer these questions to demonstrate what you've learned:

Check your knowledge

1.

Arrays are a fixed-length data type, but how can you define their size based on the data you used to initialize them?

2.

A slice works with an underlying array, and arrays are fixed-sized length. What happens when you add an element to the slice and the underlying array is full?

3.

What happens when you create another slice using the slice operator s[i:j] and you make a change to an element in the new slice?

4.

When you're iterating the elements of a map, can you access the key and its value simultaneously?

5.

Can you embed one struct into another struct?