Syntax

Main article: JavaScript syntax

As of 2008, the latest version of the language is JavaScript 1.8. It is a superset of ECMAScript (ECMA-262) Edition 3. Extensions to the language, including partial E4X (ECMA-357) support and experimental features considered for inclusion into ECMAScript Edition 4, are documented here.

Sample code:

var el, ev, tabContent, tabContents, currentTab, currentID, tabPac, tabPic;
var pacIDvar, picID, tabHelp;

// Mouseover commands to change look of buttons & text, etc., on playlist
document.onmouseover = function(e) {
getElementByEvent(e);
switch (el.className) {
case 'tab':
el.className = 'ovrtab';
break;
case 'off':
el.className = 'ovr';
break;
case 'bti2f wbd':
el.className ='bti2t wbd';
el.parentNode.className = 'bto2t';
if (el.id.charAt(0)=='w') {
window.status = type[currentTab.id.charAt(1) - 1][el.id.substring(1)][0];
} else if (el.id.charAt(0)=='p') {
window.status = type[currentTab.id.charAt(1) - 1][el.id.substring(1)][1];
}
break;

}
switch (el.id) {
case 'inHip':
el.style.color = '#000000';
break;
}
}

No comments: