Now that we have some media to work with and the browser tools at our disposal, let's start some more toying with JavaScript and compare its syntax to what you already know in ActionScript 3.
Unlike variables declared within ActionScript 3, JavaScript variables are not strictly typed. This takes the familiar ActionScript 3 variable declaration from:
var myVariable:String = 'abc123';
to a simpler syntax within JavaScript which looks as follows:
var myVariable = 'abc123';
This lack of strict typing is referred to as dynamic typing. Variables in JavaScript can be used as any type at any time. Consider this example:
var exampleVar; // A undefined variable exampleVar = "Some example text"; // Variable is now a String exampleVar = 12345; // Variable is now a Number
Dynamic typing allows code to be writing faster by requiring less input from the developer, but this development ease comes at the cost of debugging large applications...