What is Javascript ?

Javascript is the scripting language and is the only browser language which works in browser. Be it Jquery or reactjs or angularjs, everything is based on javascript and ultimately converted to javascript then only it works in browser.

Now do not forget this in javascript ever::
JavaScript itself is a synchronous language, meaning it executes code in a single thread, one statement at a time.
However, JavaScript can interact with asynchronous APIs provided by the browser, including those in the BOM(Browser Object Model) and DOM (Document Object Model), to handle asynchronous operations.

Purpose of Javascript ?
Javascript is used for frontend as well as backend.

In frontend, it is used for multiple stuffs. Some of the most prominent are::
  1. User interaction
  2. Manipulating/Modifying webpage dynamically
  3. Ajax/Asynchronous processing
  4. Form validation on client side
  5. Show notifications to users

Some of the user interactions include showing popup when a button is clicked, change background color or text content dynamically or communicating with APIs, validating form fields before sending to backend, showing notification to users are some of the most common examples.

In backend, it is used for making APIs, communicating with databases, microservices etc.
Popular javascript frameworks/libraries
  1. React.js
  2. Vue.js
  3. Angular.js
  4. jquery (library)
  5. Node.js
  6. Backbone.js
  7. Polymer
Basic usage of javascript
<html>
  <head>Head...</head>
   <body>   
      <script type = "text/javascript">
          document.write("Going good bro...!")
      </script>      
   </body>
</html>


Note:
Understand that javascript is very vast and can be at times complex to grasp fully and you need to understand various aspects of javascript along with its usages to fully comprehend its powers.
I will explain why we study various parts of javascript here:
  • Usage of javacript in solving algorithm problems : You might have a data in a specific format and you might want to change it in other format based on some scenarios. To be able to solve this, the basic understanding of variables, data types, operators, loops, functions is needed and that is why we will study those topics.
  • Usage of DOM manipulation : You have written a html in html file(may or may not with css), if you need to do something like show texts or anything on button click, show modals/popups, form handling, dynamic pagination etc, then you need to understand various DOM related functions and its usages and how manipulations are done on DOM elements. This is the primary use of javascript in most of the webpages and that is why we will learn this.
  • Usage of Asynchronous javascript : To handle an API requests to a server or do something asynchronous, we study callbacks, async await, promises etc.