Check out example codes for "rust expected item found keyword let". It will help you in understanding the concepts better.

Code Example 1

let can only be used inside a function

Learn ReactJs, React Native from akashmittal.com