Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Fix the Variable

The code below tries to change a variable, but there's a bug. Find and fix it!

Expected output:

text
green
blue

Hint: In Rust, you need mut to change a variable's value.

rust
fn main() {
let color = "green";
println!("{}", color);
color = "blue";
println!("{}", color);
}