+ 8

What about html comment??

Can we use html comment codes instead to js code because that's pretty easy to learn and remember.I am not saying that it's difficult to remember but only asking if we can use html comment instead of this...If it can then it would be good thing...

11th Feb 2019, 4:57 PM
Shourya
Shourya - avatar
10 Answers
+ 5
<!-- this is a comment --> this is correct in HTML but this doesn't exist in JavaScript. In JavaScript use //for a single line comment Example :- // this is a comment and if in any case you need to comment out multiple lines of codes use /* ..... this is a comment..... */
15th Feb 2019, 5:32 PM
Eyu
Eyu - avatar
+ 21
Hey Check Out My Code So You Will Understand!👍 Here: ⬇️⬇️⬇️ https://code.sololearn.com/WfVFvaK46ZRi/?ref=app
9th Mar 2019, 2:41 PM
K͜͡ɩnɢ・ムzizi 🖤
K͜͡ɩnɢ・ムzizi 🖤 - avatar
+ 14
Html comment give line within to paragraph it's so useful for divide two line..... ❤
6th Mar 2019, 10:50 AM
Kaju Kishmish❤
Kaju Kishmish❤ - avatar
+ 7
Do you mean html comments within JS code?
12th Feb 2019, 7:38 AM
Sonic
Sonic - avatar
+ 6
HTML : <!-- text --> Js : // text Css: /* text */ Happy Coding 💖😇
13th Feb 2019, 4:34 AM
Omar Khalil Bakhsh
Omar Khalil Bakhsh - avatar
+ 2
You can try to use it) <!-- --> enjoy it)
12th Feb 2019, 5:55 AM
lemuriec
lemuriec - avatar
+ 2
<!-- this a comment & it will not show in --> <!-- --> it good for hint,note, something to leave to another coworker or yourself. :)
12th Feb 2019, 6:08 AM
MUAWIYAH AHMAD
+ 2
You mean <!-- something --> in JS? I don't think so.
13th Feb 2019, 4:38 AM
[Abandoned]
[Abandoned] - avatar
0
HTML comment is not really important is just to tell any web developer that is also going to read your code that there is an information there or something else
27th Dec 2020, 11:36 AM
Success Simeon
Success Simeon - avatar