If you’re relatively new to the internet, you’re going to see the word JavaScript a lot since it used so frequently in client-side web developing. In its simplest of definitions, it is a scripting language that was the originating dialect of ECMAScript standards. The language is referred to as a dynamic, prototype-based, weakly typed language with first-class functions. It was oftentimes influenced by many different languages during its development stages, and was designed to resemble Java but be simpler for people with no programming experience to use.
JavaScript is basically unrelated to Java and its programming language. However, they both use the common C syntax. JavaScript has also copied many Java names. When Netscape and Sun struck up a co-marketing contract, the language was renamed from the original LiveScript. This was done as an exchange wherein Netscape bundled Sun’s Java runtime with their current browser. The self-programming language is where JavaScript inherited the key designing principles.
JavaScript is a trademarked product of Sun Micro Systems and was used as a licensed technology that Netscape invented and implemented. There is also a relationship with the Mozilla Foundation as well. Brendan Eich of Netscape was the original developer of JavaScript (originally called Mocha). It was renamed LiveScript, and finally JavaScript. When Netscape added support for JavaScript technology, the change from LiveScript to the current name occurred.
JavaScript debuted in December of 1995 when it was introduced and deployed in the Netscape browser. Support was added for the technology to equate within the browser’s capabilities. The confusion still exists giving people the impression that JavaScript is a descendant of Java and Netscape was condemned as using this as a marketing ploy. But this is not the truth, and should not be misconstrued as such. Microsoft named its version Jscript so as to avoid copyright and patent infringement ramifications, and was first supported in august of 1996 by Internet Explorer 3.0.
As was mentioned earlier, JavaScript is prototype-based using the three following design principles and techniques:
Functions as methods – no distinction is made between functional definition and methodical definition. Function calling is where the distinction is actually made seeing as how a function is oftentimes referred to as a method.
Functions as object constructors – along with the typical role, functions oftentimes double as object constructors. Using the word “new” when you prefix the function call creates a new object and refers to that function as its local keyword. The prototype of the function determines the prototype of the object.
Prototypes – instead of classes, JavaScript uses prototypes in the defining of any object’s properties. This would include such entities as inheritance and various methods. But it is also a possibility that other class-based features can be simulated by virtue of using JavaScript prototypes.
For more information and clarification of JavaScript, you should visit the JavaScript website at http://www.javascript.com or there is an excellent tutorial available at a site called W3Schools.com — http://www.w3schools.com/JS/default.asp. Either one of these will afford you with a better understanding of JavaScript and its functions.