Lifetimes of References

There’s an important restriction on references, both mutable and immutable, they cannot live longer than the values they are referencing. Let’s look at an example:

Get hands-on with 1000+ tech skills courses.