Lets Learn Rust - 10 - Understanding Arrays

6 months ago
11

G'day guys

In this video I talk about our second compound type in Rust. The Array. The array allows us to store multiple items of the same data type into a fixed size list.

I show you how to create one, then how to get the values each item using indexes.

Important Times

00:00 - Introduction
00:14 - What is an Array?
00:32 - Declaring and instantiating an array
01:26 - Gotchas with arrays and data types
02:16 - Explicitly declaring and instantiating an array
03:06 - Issues setting incorrect number of items
03:39 - Fetching items from array using indexes
06:09 - Issue using invalid index
07:32 - Fetching from back of an array
08:47 - Initialize a default for all items
09:45 - Conclusion

Loading comments...