Comments

Going along with the “the computer doesn’t care” idea, is something called comments. Comments are a way for you to add in a message for other programmers to read. Sometimes those other programmers are just you in six months when you’ve forgotten everything about the code. So, writing good comments can be helpful to both you and others.

There are two ways to write comments in Rust. The first is to use two forward slashes //. Then, everything up until the end of the line is ignored by the compiler. For example:

Get hands-on with 1000+ tech skills courses.