Title: Script Tag and a .js File - Course JavaScript - Lesson 2
Duration: 18 minutes
Summary: In this video we continue our JavaScript course. We will see how to place code in the script tag to make calls to built-in functions (for example, the Date object), and how we can place out own functions in a .js file. In order to display the results of our calls, we will use the alert() function that displays the information is a small window. We also use document.writeln() to display the content directly in the browser. Another important concept that we will look at is variable scope. A variable declared with the ‘var’ keyword will have the scope of where it is declared (for example, in a function). A variable declared without the var keyword can be used anywhere on the page. It is not recommended that you declare global variables like this (better to use the var keyword). Finally, I will show you how to obfuscate the code so no one can copy your functions and interpret your logic.
Methodology of the development of example: Good coding standard and simplified design.
Technology Used: JavaScript – Core language Concepts.
Keywords: CSS, JavaScript, HTML, function, var, script, document, writeln, Date.












See the prices for this post in Mr.Bool Credits System below: