Files
freeCodeCamp/guide/russian/javascript/tutorials/comment-your-javascript-code/index.md
2018-10-16 21:32:40 +05:30

22 lines
933 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Comment Your JavaScript Code
localeTitle: Комментарий
---
Комментарии - отличный способ оставить заметки для себя и для других людей, которым позже нужно будет выяснить, что он делает. Любой код в нем будет проигнорирован.
Давайте рассмотрим два способа написания комментариев в JavaScript.
* Комментарий с двойной косой чертой прокомментирует оставшуюся часть текста в текущей строке:
`// This is a single line comment.`
* Комментарий slash-star-star-slash будет комментировать все между символами `/*` и `*/` :
```javascript
/*
This is
a multi-line comment
(comment block)
*/
```