JavaScript: What is it used for?

For those who have started recently in the fascinating world of web design, the word JavaScript sounds a bell. This language is a must know for every web developer because web design is the place where this tool takes most part.

But what does it do? Why is it so important? And more important: Why is JavaScript everywhere? Well, if you’re an adventurer, you can go in the settings of your favorite browser an disable JavaScript in order to see how catastrophic can a web browsing experience could be without it (even Facebook won’t work at all if it isn’t activated) or you might follow the read in order to learn what is JavaScript all about.

First, let’s understand what is behind a website.  When the web content is defined, we have to sit and work on the markup language that will help us organize the component parts of it. It is important to write it with the least restrictions possible to allow your web to be responsive. HTML is one of the most used languages to accomplish this function. Now it comes the part when we give some appearance to this content and this will be achieved using CSS. This language is responsible for the web being able to show the content in the appropriate format in a responsive way, it won’t matter which device is being used by the visitors that reached your web.

These two languages will provide you functional website that will work by the usage of requests and responses. This will make your website static as it will load a new page (static as well) every time you make a request, which means that it will not be interactive nor enjoyable.

JavaScript is the capeless hero we need to come and ease the interaction between the website and our visitors. It adds behavior to the page which means that is not necessary to load a whole new page every time a request is submitted. The usage of JavaScript allow us to include some animations, images, objects and many other features that could ease the browsing experience or maybe attract the attention of our visitors to a section we want to experience more traffic.

Let’s picture an everyday situation: filling a form in order to make a request via web. Once we’re done, we hit the submit button and wait for a response. A new page tells us that our email address is not valid and we have to fill it all over again. It’s a tedious situation, right? Well, JavaScript will give us a response without the need of hitting “submit”.  Somewhere, a little dialog might show up telling us to fix our address before submitting, because something might have gone wrong.

It’s important to have a website that might work regardless our visitors have JavaScript or not, but the inclusion of this language on the design will make our visitors happier and wishing to keep coming back. Include it and see how it goes!