Comments
Comments are notes in your code that JavaScript ignores. They help explain what your code does and make it easier to understand.
Single-Line Comments
Use // for single-line comments:
Loading JavaScript Playground...
Multi-Line Comments
Use /* */ for multi-line comments:
Loading JavaScript Playground...
Why Use Comments?
Comments serve several purposes:
Loading JavaScript Playground...
Exercise: Add Comments
Add a comment explaining what each line does:
Loading JavaScript Exercise...
Exercise: Disable Code
Use comments to prevent the middle line from running:
Loading JavaScript Exercise...
التالي · الدرس 4 من 37
Variables (let, const, var)
قراءة 1 دقيقة
أنهيت 3 من 37 درسًا

اسأل Byte عن هذا الدرس
محادثة خاصة حول هذا الدرس. قرأ Byte الدرس كاملًا، ويجيب خلال ثوانٍ، ويُظهر القسم الذي تأتي منه كل إجابة. يمكنك السؤال بأي لغة.
الأسئلة والأجوبة
أسئلة عامة حول هذا الدرس. يجيب AI Tutor فورًا بلغتك، ويراجع فريق FreeAcademy الإجابات، ويمكن لكل المتعلمين قراءتها.

