If we only had
// for comments then all comments would have to be on a single line and that would get messy real fast. Code formatting for easy readability is important, and the same goes for comments, so there is a need for multi-line comments and thus we have
/* ... */ for those.
I suppose we could do away with
// and just force all comments to use
/* ... */ like CSS does. But you have to understand, programmers are lazy by nature. And that’s not a bad thing. Why spend the extra keystrokes having to type
*/ for a single line comment when you can just type
//? Single line comments are so common that you will save a lot of typing.
So really, I would ask why CSS forces you to always use
/* ... */.
perfect answer. thank you