Mutation and Shadowing

We’ve seen that mutation and shadowing can in some ways serve the same goal: making the same name mean different things at different points in your code. However, it’s important to remember that these are different concepts. For example, you can shadow an immutable variable with a mutable one:

Get hands-on with 1200+ tech skills courses.