hoisting
Functions can be called from anywhere in your code.
e.g.
fn main() {
hello_world();
}
fn hello_world() {
println!("Hello, Rust!");
}
Select a result to preview
Functions can be called from anywhere in your code.
e.g.
fn main() {
hello_world();
}
fn hello_world() {
println!("Hello, Rust!");
}