JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of webpages, and many non-browser environments also use it.
JavaScript is used to make webpages interactive (e.g., having complex animations, clickable buttons, popup menus, etc.)
JavaScript can be used for Client-side developments as well as Server-side developments.
JavaScript contains a standard library of objects, like Array, Date, and Math, and a core set of language elements like operators, control structures, and statements.
Client-Side:
It supplies objects to control a browser and its Document Object Model (DOM). Like if client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. Useful libraries for the client-side are AngularJS, ReactJS, VueJS and so many others.
Server-side:
It supplies objects relevant to running JavaScript on a server. Like if the server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server. The useful framework which is the most famous these days is node.js.
Why learn JavaScript?
No need for compilers: Since JavaScript is an interpreted language, therefore it does not need any compiler for compilations.
Used both Client and Server-side: Earlier JavaScript was used to build client-side applications only, but with the evolution of its frameworks namely Node.js and Express.js, it is now widely used for building server-side applications too.
Helps to build a complete solution: As we saw, JavaScript is widely used in both client and server-side applications, therefore it helps us to build an end-to-end solution to a given problem.
Used everywhere: JavaScript is so loved because it can be used anywhere. It can be used to develop websites, games or mobile apps, etc.
Huge community support: JavaScript has a huge community of users and mentors who love this language and take its legacy forward.
What You Should Already Know?
This guide assumes you have the following basic background:
- A general understanding of the Internet and the World Wide Web (WWW).
- Good working knowledge of Hypertext Markup Language (HTML).
- Some working knowledge of CSS.
- Some programming experience.
History of JavaScript
It was created in 1995 by Brendan Eich while he was an engineer at Netscape. It was originally going to be named LiveScript but was renamed. Unlike most programming languages, the JavaScript language has no concept of input or output.
It is designed to run as a scripting language in a host environment, and it is up to the host environment to provide mechanisms for communicating with the outside world. The most common host environment is the browser.
Version |
Official Name |
Description |
ES1 |
ECMAScript 1 (1997) |
First edition |
ES2 |
ECMAScript 2 (1998) |
Editorial changes |
ES3 |
ECMAScript 3 (1999) |
Added regular expressions & try/catch |
ES4 |
ECMAScript 4 |
Never released |
ES5 |
ECMAScript 5 (2009) |
Added “strict mode”, JSON support, String.trim(), Array.isArray(), & Array iteration methods. |