Focus mode
The "return" statement exits the current function or scope and returns a value to the called statement. If there is no return, type () is returned (parenthesized structure meaning no value return).
You can find detailed further information from Rust Official documentation:
https://doc.rust-lang.org/std/keyword.return.html
For a detailed explanation of Return Expressions, you can watch this video as an additional resource:
Programs to Accelerate Your Progress in a Software Career
Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!
You need to enroll in the course to be able to comment!