33. Javascript Comments And How to Link Scripts - Full stack web development Course
25.4 هزار بار بازدید -
6 سال پیش
-
In this FullStackWebDevelopment tutorial series
In this FullStackWebDevelopment tutorial series video, We learn how to link a #javascript file inside our HTML code.
Instead of defining the javascript inline it is a better practice to define it outside and link the file to the code. This can be done by providing the path to the js file inside the #script tag. This external javascript file is linked inside the head tag instead of the body.
The javascript program we wrote earlier was inline javascript which is generally not a good practice. It makes the code look complicated also it becomes difficult to debug. An external javascript file linked through the script keeps the code in an organised manner, making it easy to find bugs and debug it.
To define it outside and link the file code we perform refactoring. Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.
JavaScript #comments :
// It is used for single line commenting. Any line of code that starts with // will not be executed or ignored by Javascript.
/*......*/ It is used for multiline commenting. All the lines of codes between them will not be executed or ignored.
----------------------------
Week 1 : Day 6
Section 5 : Learning to Code With Javascript
Tutorial 33: Javascript Comments And How to Link Scripts
----------------------------
Do subscribe and hit Bell Icon
----------------------------
Follow us in social media handles for opportunities and code related support.
Instagram: Instagram: wb.web
Facebook: Facebook: wbweb
Twitter: Twitter: wbweb_in
LinkedIn: LinkedIn: wbweb
----------------------------------------------------------
Got a question on the topic? Please share it in the comment section below and our experts will answer it for you.
For more information, please write back to us at [email protected] or call us at IND: 7077568998
After completing the course, write to [email protected] for internship or freelancing opportunities.
For consultation or partnership related queries drop a mail to [email protected].
Instead of defining the javascript inline it is a better practice to define it outside and link the file to the code. This can be done by providing the path to the js file inside the #script tag. This external javascript file is linked inside the head tag instead of the body.
The javascript program we wrote earlier was inline javascript which is generally not a good practice. It makes the code look complicated also it becomes difficult to debug. An external javascript file linked through the script keeps the code in an organised manner, making it easy to find bugs and debug it.
To define it outside and link the file code we perform refactoring. Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.
JavaScript #comments :
// It is used for single line commenting. Any line of code that starts with // will not be executed or ignored by Javascript.
/*......*/ It is used for multiline commenting. All the lines of codes between them will not be executed or ignored.
----------------------------
Week 1 : Day 6
Section 5 : Learning to Code With Javascript
Tutorial 33: Javascript Comments And How to Link Scripts
----------------------------
Do subscribe and hit Bell Icon
----------------------------
Follow us in social media handles for opportunities and code related support.
Instagram: Instagram: wb.web
Facebook: Facebook: wbweb
Twitter: Twitter: wbweb_in
LinkedIn: LinkedIn: wbweb
----------------------------------------------------------
Got a question on the topic? Please share it in the comment section below and our experts will answer it for you.
For more information, please write back to us at [email protected] or call us at IND: 7077568998
After completing the course, write to [email protected] for internship or freelancing opportunities.
For consultation or partnership related queries drop a mail to [email protected].
6 سال پیش
در تاریخ 1397/03/04 منتشر شده
است.
25,489
بـار بازدید شده