Telegram Group & Telegram Channel
HTML-like Comments

JavaScript qiziq til-da! Men ham bugun bildimki, HTML dagi kommentlar JS da ham ishlar ekan.

Yuqoridagi kodda <!-- ifodasi aslida komment boshlanishi edi. Shuning uchun ataylab joy tashlamay yozgandim. Aybga buyurmaysiz, qizg'in baxs ko'rgim kelgandi 😬.

Javob: 0

Chunki: "0 <!-- a;" === "0 // a;"
Ya'ni 0 dan keyin kelgan qism kommentariyaga aylanadi.

Variantlarda ham to'g'ri javob yo'q edi. Uzr 😬️

Aytgancha, bu nafaqat brauzerda, NodeJS da ham ishlaydi. Chunki HTML-like comments ECMAScript spec'larida bor.

https://262.ecma-international.org/#sec-html-like-comments
👍12🔥1



tg-me.com/brogrammist/235
Create:
Last Update:

HTML-like Comments

JavaScript qiziq til-da! Men ham bugun bildimki, HTML dagi kommentlar JS da ham ishlar ekan.

Yuqoridagi kodda <!-- ifodasi aslida komment boshlanishi edi. Shuning uchun ataylab joy tashlamay yozgandim. Aybga buyurmaysiz, qizg'in baxs ko'rgim kelgandi 😬.

Javob: 0

Chunki: "0 <!-- a;" === "0 // a;"
Ya'ni 0 dan keyin kelgan qism kommentariyaga aylanadi.

Variantlarda ham to'g'ri javob yo'q edi. Uzr 😬️

Aytgancha, bu nafaqat brauzerda, NodeJS da ham ishlaydi. Chunki HTML-like comments ECMAScript spec'larida bor.

https://262.ecma-international.org/#sec-html-like-comments

BY Brogrammist


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/brogrammist/235

View MORE
Open in Telegram


Brogrammist Telegram | DID YOU KNOW?

Date: |

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

Brogrammist from id


Telegram Brogrammist
FROM USA