Rust Syntax
Every program starts at fn main. Statements end with a semicolon, blocks use curly braces and names are case sensitive. Comments use // and /* */.
Example
// a comment
fn main() {
println!("Syntax"); /* inline */
}Result
Syntax
Exercise
End a statement.
println!("a")Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.