JavaScript Course | What is JavaScript ?

Previous article: Introduction to JavaScript Course | Overview
Introduction
JavaScript is a very famous programming language that was originally started almost twenty years ago with the motive of making web pages alive. It is also an essential part of the web developer skillset. In simple terms, three main languages are required to be a web developer, these are:

  • HTML: Allows you to add content to the web page
  • CSS: Used to specify the layout, style, alignment of web pages.
  • JavaScript: Improves the way web pages behave.

JavaScript is easy to learn but hard to master and is used for a wide variety of purposes, from simply enhancing the functionality of a website to running cool games and web-based software.
History
JavaScript was created over a period of several days by Brandan Eich, a Netscape employee, back in September 1995. Initially called ‘Mocha’, the language’s name was changed to ‘Mona’ and then ‘LiveScript’ before eventually becoming known as ‘JavaScript’. In 1996, JavaScript was officially given the name of ECMAScript, with ECMAScript 2 coming out in 1998 and ECMAScript 3 following up in 1999. Today we have ECMAScript 2018. This evolved into today’s JavaScript, which now works not only across different browsers but also on different devices including desktops and mobile devices. In just twenty years or so it’s gone from a primitive programming language to one of the most important tools in a web developer skill set. It’s hard to miss JavaScript if you have worked on the Internet.
Working
Inside a normal Web page, which contains some HTML and CSS, you place some JavaScript code. When the browser loads the page, the browser has a built-in interpreter that reads the JavaScript code it finds in the page and runs it. The built-in browser interpreter is basically the ‘JavaScript virtual machine’. Different engines have different codenames, different for different browsers, but they do the same thing more or less. These are:

  • V8– in Chrome and Opera
  • Chakra – in Microsoft Edge
  • SpiderMonkey – in Firefox

What Javascript(in-browser) can do?
Modern JavaScript is very powerful as when compared to the versions launched 10 years ago. I can be termed as a ‘Safe’ Programming language as it was initially created for browsers which do not require it. In browser, JavaScript can do many things like interaction with the user, webpage manipulation and the web server. Some of these are:

  • Add new HTML content to the page
  • Change Existing HTML content and styles
  • React to user actions like mouse clicks, pointer movements etc.
  • Can get and set cookies
  • Remember the data on the client-side.

What Javascript(in-browser) can’t do?
There are several things that the javascript can’t do and some of these can mainly be related to principle of ‘user’ safety.

  • In-browser JavaScript may not read/write arbitrary files on the hard disk, copy them or execute programs. Basically it doesn’t have a direct access to OS system functions.
  • It cannot protect your page source or images.
  • It cannot access web pages that are hosted on another domain.

Next article: JavaScript Course | Printing Hello World in JavaScript



My Personal Notes arrow_drop_up

Executive Software Developer at Cavisson Systems

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.