Whats the essence of the comment code since it doesn't reflect on the browser | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Whats the essence of the comment code since it doesn't reflect on the browser

3rd Feb 2019, 6:19 PM
Victor Josiah
Victor Josiah - avatar
2 Answers
+ 1
When you enter the code source, comments will help in explaining and understanding the functionality of different parts, so you can easily change something etc. For example with a comment you can explain what this <div> does or something else. Changes need to be made in the code, not in browser, and the comments may not appear for security reasons ( if you means by pressing Ctrl + Shift + i).
3rd Feb 2019, 6:40 PM
Charlie S
Charlie S - avatar
0
comments are used for: 1. making you and other coders go through your code and understand 2. They can be used to summarize ypur code 3. You can use comments to debug(making a block of code a comment so you find out a problem in your code) 4. You can also use the comment tag to "hide" scripts from browsers without support for scripts (so they don't show them as plain text).
4th Feb 2019, 2:40 PM
Peter Ominyi
Peter Ominyi - avatar