When you use getElementsByTagName or getElementsByName JavaScript receives a nodelist and not an array. While the nodelist that some DOM calls return to JavaScript looks a little like an array there are some important differences as this thirteenth modern JavaScript tutorial explains.
NodeLists
When we speed up our JavaScript downloads by letting them download in parallel we lose control over which will run first as they will each run when they finish downloading. If there is a dependency between the scripts then you will need to modify the code in the one that is supposed to run second so that it can handle if it ends up running first.
Synchronising JavaScripts
When it comes to modern unobtrusive JavaScript the only references to JavaScript in your HTML should be script tags to reference the external scripts that handle everything else that is JavaScript related. There are two possible places to put those script tags and here we look at the pros and cons of each.
The Best Place to Attach JavaScript
Regular Expressions capture a lot of information about your text in a number of properties. When you process a Regular Expression it can not only update the text string that you are processing it against. There are many properties associated with Regular Expressions and some of these can be set to change the way the expression is processed while others return information about the processing that was performed and even pieces of the string. The twentieth Regular Expressions tutorial introduces you to these properties and what you can do with them.
Properties of RegExp