Summary

  • Every Rust program starts at the main function

  • Inside the main function, you can do things like call println

  • The println macro lets us do interpolation to produce outputs

  • We can define variables that hold onto values using let

  • We can perform basic arithmetic using +, -, *, and /

  • Each value has a type, which says what kinds of things it can hold

    1. A &str is the type of a string literal, like "Michael"

    2. There are lots of different number types, but we’ll mostly use i32

Get hands-on with 1200+ tech skills courses.