Thursday, 17 December 2020

Javascript Introduction

Have you ever wondered why JavaScript is so popular and can't putted back even if there are many languages to replace it. When you talk about front-end development, HTML, CSS and JavaScript are building blocks. JavaScript is something that is must for web application.

Let’s see what’s so special about JavaScript, what we can achieve with it, and what other technologies play well with it.

What is JavaScript ?
  • JavaScript was initially introduced to make 'web pages alive'.
  • JavaScript was invented by Brendan Eich in 1995.
  • The program written in this language is called script.
  • It can be written right in a web page’s HTML and run automatically as the page loads.
  • Scripts are provided and executed as plain text. They don’t need special preparation or compilation to run.

In this aspect, JavaScript is very different from another languages like c++ and Java.

When JavaScript was created, it was originally named Mocha, but quickly became known as LiveScript. But Java was very popular at that time. So, this script renamed as JavaScript. According to some people, it was a marketing strategy to make this script accept by people. And according to some, name JavaScript came from Netscape's support of Java applets within its browser.

Of course, JavaScript is totally uncorrelated with Java.

Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine.

The browser has an embedded engine sometimes called a “JavaScript virtual machine”.

Different engines have different codenames.

For example,

  • V8 - in chrome and opera
  • SpiderMonkey - in firefox
  • Chakra - for IE
  • ChakraCore - for Microsoft Edge
  • Nitro and “SquirrelFish” for Safari, etc.

The terms above are good to remember because they are used in developer articles on the internet.

How do engine works?

Engines are complicated. But basics are easy.

  • Engine reads the scripts.
  • Then converts / compiles the scripts to machine code(binary code i.e. 0 &1).
  • And then program executes.
What makes the JavaScript unique
  • Full integration with HTML/CSS.
  • Simple things are done simply.
  • Support by all major browsers and enabled by default.

JavaScript is the only browser technology that combines these three things.

That’s what makes JavaScript unique. That’s why it’s the most widespread tool for creating browser interfaces (method of interacting with an application).

JavaScript also allows to create servers, mobile applications, etc.

JavaScript was initially created as a browser-only language, but it is now used in many other environments as well.

For detailed information, visit : ReIntroduction to JS

Today, it is most widely-adopted browser language with full integration with HTML and CSS.

No comments:

Post a Comment