Skip to content
Make room for learningYour learning studio
Use a value without taking it4 min

Loading your session…

A small idea, worth understanding

Use a value without taking it

Distinguish borrowing a String from moving it.

Assigning a String to another binding normally moves ownership. The old binding can no longer be used.

A shared reference borrows the value so another function can inspect it without taking ownership.

Two activities. No typing needed. You can always retry, or read an explanation and continue.

Read the full lesson first