JavaScript Basics : What is JavaScript ?

JavaScript Basics : What is JavaScript ?

Hello Developers, Greeting of the day. Today, I am going to tell you about the basics of JavaScript. If you want to become a successful developer, whether it is Front end, backend or even blockchain development, JavaScript is being used widely everywhere. Earlier, it was only used for a front end development but after the arrival of Node.js , the same langauge can be used for backend by eliminating PHP which is almost 27 year old.

What is JavaScript ?

Before moving to its definition which is available everywhere, i give you a very simple example. Suppose you created a static website (a simple website, just for sharing some information). And you want to change its content after some times, when user click on a button, or scroll to a particular section or even change background. All of these types of functionality can't be achieved with HTML or CSS. These two languages are just for showing and styling web pages thats it.

So here JavaScript role comes. Actually JavaScript can easily play with our DOM(Document Object Model). Whenever we create a webpage, it automatically divides into several parts, results creating a Tree like structure. Please have a look at below picture.

DOM.jpg

So if you want to change content of heading tag dynamically, JavaScript is the only way. This is why it is used for a Front End Development.

Let's come to the definition- According to the Mozilla Website Documentation, "JavaScript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else"

History of JavaScript

  • Developed by NetScape in 1995

  • JavaScript Developer Name : Brendan Eich

  • First JavaScript was said to be Mocha, than "LiveScript" and finally it turns into "JavaScript"

Prerequisites before JavaScript

If you are learning JavaScript, it means you must have a basic understanding of HTML and CSS. Thats it. One more thing which will make you feel good that HTML and CSS are the simplest languages. You could learn it within 15 days. And later, if you keep making project which is based on HTML/CSS, you will learn a lot.

Advantages and Disadvantages of JavaScript

Am I kidding or gone mad ? Has JavaScript some disadvantages ? Yes, it is true that it has some disadvantages. But le'ts focus on it some advantages :

Advantages :

  • Execution on Client side

  • Validation on browser

  • Platform independent

Disdvantages :

  • Less Secure (As the code executes on browser)
  • No Hardware access (like USB Port etc)
  • If you are using too much animations on your website,it will take longer too load your website.

I hope, after reading this article you must have an basic understanding about what is javascript ? In the next tutorial , I'll start with coding. Until then Bye-Bye :)