JavaScript:Overview

What is JavaScript?

 * JavaScript is a scripting language developed by Netscape around 1995 that is somewhat similar in capability to Microsoft’s Visual Basic, Sun’s Tcl, the UNIX-derived Perl, and IBM’s REXX.
 * JavaScript is primarily used in web browsers to add client-side interactivity such as: automatically include today’s date on a Web page, make a linked-to page to appear in a popup window, make text or a graphic image change during a mouse rollover, validate form information and check a user’s computer set-up (e.g. to check whether they have a plug-in installed), plus can add "fun" interactive elements to a web page..
 * In general, scripting languages are easier and faster to code in than the more structured and compiled languages such as C and C++. Script languages generally take longer to process than compiled languages, but are very useful for shorter programs.
 * JavaScript code can be imbedded in HTML pages and interpreted by the Web browser (or client). JavaScript can also be run at the server as in Microsoft’s Active Server Pages (ASPs) before the page is sent to the requestor. Most modern web browsers support JavaScript (including those on some mobile devices), but sometimes in slightly different ways.
 * The web browser provides a host environment for client-side computation including, for instance, objects that represent windows, menus, pop-ups, dialog boxes, text areas, anchors, frames, history, cookies, and input/output.
 * JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation. For example, you can write a JavaScript function to verify that users enter valid information into a form requesting a telephone number or zip code. Without any network transmission, the HTML page with embedded JavaScript can check the entered data and alert the user with a dialog box if the input is invalid.
 * JavaScript is very different to Sun's Java. Java is a fully fledged programming language (like Microsoft's Visual C# or VisualBasic ), and is designed to be platform independent (runs on Windows, Unix, MocOS).
 * JavaScript is one dialect of ECMAScript (ECMA-262). Others include Adobe ActionScript, and Microsoft's JScript.
 * JavaScript has become very popular as a part of AJAX (asynchronous JavaScript and XML), which gives a Web browser the ability to retrieve data from a Web Server without having to refresh the entire page. Google used this extensively when it introduced Gmail in 2004 and Google maps (2005).

Summary

 * JavaScript is a scripting language
 * A scripting language is a lightweight programming language
 * A JavaScript is lines of executable computer code
 * A JavaScript can be inserted into an HTML page
 * JavaScript is an open scripting language that anyone can use without purchasing a license
 * JavaScript is supported by all major browsers like Internet Explorer, Firefox, Chrome & Safari.

Object Oriented

 * JavaScript is a language that uses object oriented concepts, it is not a true object oriented environment
 * All javascript components are objects (things that do something specific and can be changed)
 * Document object (visible web page) you can modify size, color, text using JavaScript
 * Examples:

JavaScript and HTML

 * When a JavaScript is inserted into an HTML document, the Internet browser will read the HTML and interpret the JavaScript. The JavaScript can be executed immediately, or at a later event, depending how and where it is placed.
 * To add JavaScript to an HTML page enclose code between


 * Note. You may find &lt;script language ="Javascript"> in code you see on the Internet. The language attribute has been deprecated so avoid using it in your code.


 * Example HTML page with JavaScript

Example :. The diagram following shows the result in Google's chrome.

JavaScript Tutorials

 * Javascript Tutorials, Examples, and Code Reference (2011)
 * http://javascriptissexy.com/how-to-learn-javascript-properly/
 * http://www.codecademy.com/#!/exercises/0
 * MOOC's
 * https://www.edx.org/
 * https://www.udacity.com/
 * https://www.coursera.org/

JavaScript development

 * jsFiddle.net
 * JsFiddle is a playground for web developers, a tool which may be used in many ways. One can use it as an online editor for snippets build from HTML, CSS and JavaScript. The code can then be shared with others, embedded on a blog, etc. Using this approach, JavaScript developers can very easily isolate bugs

Javascript Examples
JavaScript is capable of providing a wide range of interactive effects in a web browser


 * The JavaScript source provides over 1,400 scripts (July 2010) ranging from image effects (rotating banners, animations), games, form validation, and navigation menus (like drop downs).
 * (Only works in Internet Explorer)
 * Chrome experiments


 * JavaScript-based PC emulator, running GNU/Linux (Doctorow, 2011)


 * SunSpider JavaScript Benchmark


 * An experiment on creating volumetric 3d-like clouds with CSS3 3D Transforms and a bit of Javascript(2012)