New course! Every coder should learn Generative AI!
Try a free lesson0
Why do we use // for cmt while we can use <!-- text --> ?!
3 Answers
+ 4
@Nikunj Arora
/* this is used in CSS and in JS */
+ 2
<!-- This comment only works in HTML -->
\* This is used in CSS *\
// This is used in JavaScript
+ 1
To avoid nesting