JavaScript Comments: Explained | Attaching JavaScript to HTML
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- Learn the importance of comments in JavaScript and how to link your JavaScript file to HTML!
In this tutorial, we'll cover:
Types of Comments:
1. Single-line comments (`//`)
2. Multi-line comments (`/* */`)
Why Use Comments?
Code readability
Debugging
Collaboration
Documentation
Attaching JavaScript to HTML:
1. Inline JavaScript (script tag)
2. External JavaScript file (linking to HTML)
Topics Covered:
Commenting best practices
JavaScript file extension (.js)
Script tag attributes (src, type)
Linking JavaScript to HTML (external file)
Code Examples:
Single-line comment: `// This is a single-line comment`
Multi-line comment: `/* This is a multi-line comment */`
Linking JavaScript to HTML: `script src="script.js" type="text/javascript"/script`
Resources:
Vite Documentation: vitejs.dev/guide/
React.js Documentation: react.dev/
next.js Documentation: nextjs.org/docs
-JavaScript:www.w3schools....
.
Deploy Your Project in Minutes Git & Vercel Tutorial
• Deploy Your Project in...
Sindh IT Hackathon Project 1 | GIAIC Program | 5 Milestones Explained
• Quarter 2 1st Hackatho...
Quarter 2 1st Hackathon | All Complete Details
• Quarter 2 1st Hackatho...
Sindh IT Initiative AI Quarter 2 Student ID Card Generation | Full Guide
• Sindh IT Initiative AI...
--- Details Video of Github ---
Git vs GitHub: Setup, Command Guide & Key Points
• Deploy Your Project in...
HTML5 Complete Tutorials for Beginners 2024
studio.youtube...
CSS3 Complete Tutorials for Beginners 2024
studio.youtube...
Install Next.js: • Next.js Tutorial for B...
GIAIC Linktree
linktr.ee/giaic
GIAIC Portal Link
portal.governo...
All materials available relative to GIAIC Quiz exams this channel
whatsapp.com/c...
Follow the Website Designing And Development Zone channel on WhatsApp: whatsapp.com/c...
GIAIC Community Link
chat.whatsapp....
Connect with Us:
🌟 Stay connected on social media! 🌟
► LinkTrees:
linktr.ee/muba...
linktr.ee/Tabe...
► TH-cam: / @developmentzone516 Zone
📧 For queries: developmentzone516@gmail.com
Subscribe for more tech tutorials and guides!
Like and comment below if you have any questions or need further clarification.
Join me on this JavaScript journey!
Subscribe for more tutorials, examples, and projects to master JavaScript and unlock your web development potential.
Share your thoughts!
Leave a comment below with your favorite JavaScript project or question.
Ma'am thora fast lekar chalen itna to sabko hi aata ha and ye document.write ka kia matlab hua likhny ka kaam to ham html ma karengy na javascript ma to functionality add karty ha na?
@@M.HUZAIFA464 Apko kisne btaya k sbko ata hai ..muje 70% msgs yehi aye hai k Hamey 0 bhi nhi pata JavaScript ka ..Baki document.write me html ka Kam ka apko nhi pata. ? To apko kese ati hai JavaScript phir ? Ap yah html tags use nhi krtey JavaScript me ?
@@DevelopmentZone516 I mean ky comments wagera to aaty hi han sabko ismy pori video nikal gai
@@M.HUZAIFA464 yes I know ..but sbkey nhi atey ksii ko to 2no comments me yeh hi nhi pata k difference kia hota hai or yeh basic question h Jo interview me aksr logo ko phnsa dete hai , don't worry agey detailing video nkll rhi ho variables, datatypes , operations and more
@@DevelopmentZone516 Ok thank you ☺☺