Now, we'll learn what references are and how they differ from pointers.

A reference is an alias for an existing variable. It can be created using the & operator.

Once created, the reference can be used instead of the actual variable. Altering the value of the reference is equivalent to altering the referenced variable.

Get hands-on with 1000+ tech skills courses.