Blogs

Java Script Files

Must of the java script code that will be written, is going to live within files. There are important considerations to take in count while working with files

Semicolon

In Java Script semicolons tell the compiler where a given sentence of code will finish, these are some examples
var myVariable1 = "I am the variable 1";
myVariable1 = myVariable1 + " and this is some other string" ;

Printing to the console

In order to print in the console the next expression can be used

Script tag

The script tag is an html element that allows java script files to be called inside a html document.

Syntaxis
 

The script tag can be written like 
<script src="sourceFile.js"></script>

Location

A common place to find ths script tag is within the <head> tags

<head>
    <script src="sourceFile.js"></script>
</head>

File System Hierarchy

Pages

Subscribe to RSS - blogs