feat: add variables solutions
This commit is contained in:
parent
ea912428f0
commit
f27ffe540a
|
@ -42,6 +42,18 @@ fn define_x() -> String {
|
|||
}
|
||||
```
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
let x = define_x();
|
||||
println!("{:?}, world", x);
|
||||
}
|
||||
|
||||
fn define_x() -> &'static str {
|
||||
let x = "hello";
|
||||
x
|
||||
}
|
||||
```
|
||||
|
||||
5.
|
||||
```rust
|
||||
fn main() {
|
||||
|
|
Loading…
Reference in New Issue