You've learned how to add comments using double slashes (//
). Comments make your Go code easier to understand and remember.
Engagement Message
Ready to practice organizing code with comments?
Type
Multiple Choice
Practice Question
Which of these is a properly formatted comment in Go?
A. // This calculates the total score
B. # This calculates the total score
C. <!-- This calculates the total score -->
D. -- This calculates the total score
Suggested Answers
- A - Correct
- B
- C
- D
Type
Fill In The Blanks
Markdown With Blanks
Add comments to explain what each line does:
Suggested Answers
- //
- /*
- //
Type
Sort Into Boxes
Practice Question
