Back to Freecodecamp

Task 27

curriculum/challenges/english/blocks/learn-how-to-document-code-for-a-project/65e932555f5de583b53ac688.md

latest2.1 KB
Original Source
<!-- (Audio) Brian: Great idea. To write comments, you simply need to use double slashes to start a comment. Then, you can describe what the code does so that other people can understand it, too. -->

--description--

Listen to the audio and answer the question.

--questions--

--text--

What does Brian instruct about writing comments in code?

--answers--

Use double slashes to start a comment and explain the code's function


Use a single slash for comments and describe the code's purpose

--feedback--

Brian specifically mentions using double slashes, not a single slash, to start comments in the code.


Write comments at the end of the code only

--feedback--

Brian's instruction is to use double slashes to start a comment, not to place comments only at the end of the code.


Avoid writing comments as they make the code complex

--feedback--

Brian encourages writing comments using double slashes to help others understand the code, not avoiding them.

--video-solution--

1

--scene--

json
{
  "setup": {
    "background": "company2-center.png",
    "characters": [
      {
        "character": "Brian",
        "position": {
          "x": 50,
          "y": 15,
          "z": 1.2
        },
        "opacity": 0
      }
    ],
    "audio": {
      "filename": "7.1-2.mp3",
      "startTime": 1,
      "startTimestamp": 6.24,
      "finishTimestamp": 16.56
    }
  },
  "commands": [
    {
      "character": "Brian",
      "opacity": 1,
      "startTime": 0
    },
    {
      "character": "Brian",
      "startTime": 1,
      "finishTime": 6.12,
      "dialogue": {
        "text": "Great idea. To write comments, you simply need to use double slashes to start a comment.",
        "align": "center"
      }
    },
    {
      "character": "Brian",
      "startTime": 6.74,
      "finishTime": 11.32,
      "dialogue": {
        "text": "Then, you can describe what the code does so that other people can understand it, too.",
        "align": "center"
      }
    },
    {
      "character": "Brian",
      "opacity": 0,
      "startTime": 11.82
    }
  ]
}