Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Reverse Word

Reverse the string "hello" and print the result.

Expected output:

text
olleh

Hints:

  • Use .chars().rev() to get the characters in reverse order
  • Use .collect::<String>() to turn the characters back into a string
  • let reversed: String = "hello".chars().rev().collect();
rust
fn main() {
}