* COVID-19: 1 Person per Room Health & Safety Policy *

JavaScript Guide for Beginners

Written by Jonathan O'Brien

Netscape founder Marc Andreessen wanted a language Web programmers and designers could use that would allow the coding for images and plugins to be written directly in the Web page markup and display neatly on a computer screen. Netscape's team collaborated with Sun Microsystems and decided to make Sun's Java the basis of this new language. The first prototype was written in May 1995. Beta releases of Netscape 2.0 called the language LiveScript when it shipped in September of 1995, but by December, it was renamed JavaScript. As the Netscape team worked to promote and refine this new language, the first decade of JavaScript's existence was hobbled by the fact that Microsoft refused to include the language in their Internet Explorer browser, which grew to become the dominant browser. Jesse James Garrett developed the idea of Ajax in 2005, in which JavaScript was the key for allowing data to load in the background without causing a whole page to reload. This would be key to developing more dynamic Web applications going forward and help to promote JavaScript's wider use.

JavaScript in Today's World

Today, JavaScript is one of the top Internet programming languages. Ajax resulted in better JavaScript programming practices, the use of JavaScript in applications other than Web browsers, and the proliferation of frameworks and libraries devoted to JavaScript. The CommonJS project was developed in 2009 to establish standards for JavaScript development outside of Web browsers. JavaScript heavily influenced the development of the Internet: The picture-, video-, and application-rich Internet of today was made possible with JavaScript.

What Is ECMAScript?

ECMAScript is also known as ES. It is a scripting language specification and was created to standardize JavaScript. It is currently on its ninth edition. Apart from JavaScript, it is also used with JScript and ActionScript. ES is used primarily for client-side scripting on the Internet. It also is used for writing server applications.

Current Features

Today, all modern computer browsers support JavaScript, and modern features all conform to ECMAScript standards. JavaScript now supports structured programming syntax including do while loops, if statements, switch statements, and while loops. After ECMAScript 2015 was released, JavaScript gained improved scoping as well. JavaScript now can read the difference between expressions and statements. Like most other scripting languages, JavaScript is dynamically typed and is object-based. It supports anonymous functions along with implicit and explicit delegation.

JavaScript and the Internet

More than 95% of all Web pages use JavaScript as client-side programming. JavaScript allows scripts to either embed or be included from HTML. It also allows them to interact with the Document Object Model (DOM) on the page. Examples of this usage include loading new page content or sending data to the service without forcing the page to reload. A common example would be updating a social media status without actually leaving the page. JavaScript also makes interactive games possible. Web cookies and other ways of tracking behavior also use it. Responsiveness is improved by JavaScript's ability to run in a browser versus a remote server. JavaScript's ability to decode user actions, like individual keystrokes, makes it a popular choice for interfaces like Gmail's.