Types

We’ve spoken about numbers and strings. In Rust, every value has a type that tells you what kind of thing it is. When you have a string literal (something between double quotes) like "Hello, world!", its type is &str.

When you use let to declare a variable, you can give its type as well, like this:

Get hands-on with 1400+ tech skills courses.