Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
Simple answer for that is "that's how browsers are made" but. . . . . That was actually used earlier when all browsers didn't have support for Javascript, so they used to use that comments. If browser doesn't support JS then it will be treated as simple html and those lines will be ignored. But now that all browsers have support for JS you no longer need it.
11th May 2020, 7:20 PM
Raj Chhatrala
Raj Chhatrala - avatar