Share On: Twitter Facebook Google+ LinkedIn Pinterest Tumblr Reddit

What is Javascript? What is it used for?

Tags: Javascript

What is Javascript? What is it used for?

In the previous articles of this series, which we started from the basics for those who are interested in web design and try to learn, What is HTML and What is CSS? We have touched on the issues. In this article, we will talk about the Javascript language that we will use a lot while dealing with web design, and we will use it with love and pleasure.

What is Javascript?, Where is Javascript used?, What does Javascript do?, What can be done with Javascript? You can find answers to all questions in the article.

JavaScript is a scripting language commonly used in web browsers. JavaScript on the server side through platforms such as Node.js is also widely used.

JavaScript can be used embedded in HTML code to perfect the appearance of web pages, increase functionality and design dynamic web pages. JavaScript has a programming language discipline and features.

JavaScript is used in almost all developed websites today. JavaScript allows websites to be dynamic and increase their functionality. It can work user-sided and server-side. It helps websites communicate with users.

JavaScript history

JavaScript was created by Brandan Eich, a Netscape employee, over a 10-day period in September 1995. It was originally called Mocha, and the language was later named Mona and then LiveScript, just before it became JavaScript. The first versions of the language were specifically specific to Netscape and had limited functionality, but continued to grow over time with the help of the developer community.

In 1996, JavaScript officially became ECMAScript, and ECMAScript 2 arrived in 1998 and ECMAScript 3 in 1999. This evolved into today's JavaScript, and it worked not only on different browsers but also on different devices such as mobile and desktop computers.

JavaScript has since continued to grow, and by 2016 92% of websites started using JavaScript. In just 20 years, it has grown from a primitive language to the world's most popular language. If you use the internet, you must have come across JavaScript.

Why Should We Use Javascript?

What Can Be Done With JavaScript?

With JavaScript, the source codes of the HTML can be intervened, the page post process (form sending), the user can be given a message, etc. .. In short, a web page can be made dynamic with JavaScript.

How to Add JavaScript to a Website?

To be able to add JavaScript code to a web page, you must use the <script> tag. You can see what this looks like in practice using the example below:

<script type="text/javascript">
    Your JavaScript code must be here..
</script>

As a general rule, you should position the JavaScript code within the <header> tags of your website. Of course, in cases where it does not need to be operated with a specific time or a specific web page element. At the same time, by hosting the JavaScript code in different files, you can make it run on your website only when needed.

Calling a JavaScript File in HTML

Adding JavaScript codes to our web page is just like adding CSS. In the same way as calling a CSS file in HTML, we can also call our JavaScript files or write JavaScript code directly into the HTML.

<script type="text/javascript" src="the location of your javascript file"></script>

Why Should We Use Javascript?

JavaScript has several advantages over its competitors, especially in certain areas. Some of the advantages of JavaScript include:


  1. You do not need to use a compiler because web browsers interpret with HTML;
  2. It is easier to learn than other software languages;
  3. It is easier to find and solve errors;
  4. Can be set to specific web page elements or exceptions, such as mouse clicks or hovering;
  5. JS can run on multiple platforms, browsers;
  6. Can input input using JavaScript and you can reduce manual data checks;
  7. Makes websites more interactive and attracts visitors;
  8. Faster and lighter than other software languages

JavaScript Disadvantages

JavaScript Disadvantages

All software languages you can think of have some weaknesses. Part of the problem is that when a software language becomes popular like JavaScript, it also attracts attackers, scammers, and other malicious third parties, and is due to the pursuit of vulnerabilities. Some of the weaknesses of JavaScript are as follows:

  1. Vulnerable;
  2. Can be used to run malicious code on user computers;
  3. Not always supported by different browsers and devices;
  4. JS codes is quite large.
  5. It can be run differently on different devices, which may cause inconsistency.

Summary Of Javascript

JavaScript is a software language that brings websites to life. Unlike HTML (specifies content), CSS (edits display) and PHP, this works on visitors' devices rather than on the server.

  1. JavaScript is relatively easy to learn;
  2. Developed by Netscape and used on 92% of websites;
  3. JS can be assigned to specific web page elements or actions like clicks;
  4. Works on different browsers and devices;
  5. Faster and lighter than other software languages;
  6. May be less secure than other options due to its popularity;
  7. JavaScript You can add HTML directly or keep it in different files so that it works only when needed.

After all, there is a reason why JavaScript is as popular as it is today: it does so well at what it does. If you are researching on it, we hope our article helped and now you have a good answer to the question of what is JavaScript? and what is it used for?

You can find the other Sir Node JavaScript Tutorials here…

If you want to learn more details about javascript, you can go here.

Comments(0)