What is javascript? Know about javascript.

What is javascript Know about javascript
What is Javascript and how does Javascript works

Javascript is programming language used for the web. Javascript is scripting language and interpreted language. Interpreted means that you don’t need to compile it before using it. It will be rendered using its interpreter.

Javascript was introduced in 1995 and developed by Netscape. At starting, Javascript developed to make web element more dynamic and interactive for Netscape browser. Since Javascript is inspired by most popular programming language Java it’s syntax is more c to java. The first version of Javascript was named as Mocha then later it renamed to LiveScript and then again renamed to finally Javascript in December 1995.

Javascript is used at client-side (front-end side) to make the front-end of a webpage more dynamic and interactive. Using HTML and CSS you can make a static page but by using javascript in your webpage helps you to make your webpage more dynamic and interactive.

HTML,CSS and javascript

Now to make any webpage you need to use a combination of three languages used for designing webpage which is HTML, CSS, and Javascript. Javascript is the third most important language used to develop a webpage.

HTML used to describe the structure of the webpage that how to arrange elements like text, image etc. CSS used to make a webpage more beautiful using different types of fonts, colors backgrounds etc. But using these two languages you can only make a static webpage, But to make your webpage more dynamic you need to use javascript.

Using javascript in your webpage you can add animations, dialog boxes, and make elements of a webpage more programmable and dynamic so that element can change their value after some activity.

What can be done using javascript

Javascript is fully-flagged programming language so that is can do everything that any other programming language can do like Java and other programming languages. Like

  • Define new Classes
  • Define and use functions
  • Storing and retrieving values
  • Loops, arrays, conditions
  • Event handling
  • etc.

How does javascript works?

Now, let’s understand the basic of how javascript works.

  • Whenever you load any webpage your browser loads that webpage.
  • After completion of webpage loading, HTML parser starts parsing the HTML code of that webpage and creates the DOM (Document object model).
  • Whenever It encounters any CSS code or Javascript code then it transfers the control to CSS parser or Javascript engine.
  • To render the javascript code there are different types of Javascript engines are available like V8 engine developed by Google for chrome browser, SpiderMonkey for firefox, Chakra for Microsoft edge.
  • All javascript engines do almost the same thing with little difference.
  • Javascript engine loads internal and external code but it does not execute it immediately. It waits for the HTML and CSS parser to complete their task.
  • After that javascript code executed according to its order in a webpage.
  • According to javascript code, DOM will be updated and then it will be rendered by the browser.

Use of Javascript

  • Mainly javascript is used at the front-end side to make a webpage more interactive and dynamic.
  • You can add animations to your webpage.
  • You can write programs that run on the client side so it reduced the load on the server and interactions with servers.
  • You can write programs that work on the browser. For an example, you can write a program that alerts the user if the user enters the wrong data in the form.
  • Even handling processes like what to do on keypress, mouse click, etc, events.
  • You can create cookies to store temporary data about the user in the browser.
  • Javascript was designed specifically to work at the front-end side but nowadays Javascript is not limited to that only.
  • You can use Javascript to develop back-end of website’s using NODE.JS.
  • Using react naive you can create apps that work on different platforms like android, ios, and windows.

About Geek Kishan

Tech enthusiast | Geek | Programmer | Web developer | Introvert. Love to read and write about technology. I want to share my little knowledge with the world hoping that it will help someone.

View all posts by Geek Kishan →

Leave a Reply

Your email address will not be published. Required fields are marked *