Hi guys! does the comment syntax depend on the text editor ? and in which situation exactly a code should be comment?

https://www.codecademy.com/paths/web-development/tracks/styling-a-website/modules/learn-css-selectors-visual-rules/lessons/css-visual-rules/exercises/review-visual-rules

1 Like

Hi again! :slight_smile:

No, comments don’t vary based on the editor - they’re specific to the language.

JavaScript

// this is a one line comment in JavaScript
/* 
this is
a multiline
comment 
*/

CSS

/* css only
understands
these comments */

HTML

<!--
  HTML Comments look like this
-->

Comments are effectively ignored, so they can be used as a reminder of what something does - for example a brief summary of the purpose of a function - or as notes of what you’re doing as you go along. That’s just a couple of examples. :slight_smile:

1 Like

i understand man, thank you. :slightly_smiling_face:

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.