Sources: ©
Published on:
Norbert Vercauteren
Next Blog

What is JavaScript? How does it work?

JavaScript is one of the most important programming languages on the web. It is a widely used scripting language to make web pages more interactive.

What is JavaScript?

Besides HTML and CSS, JavaScript is one of the most important programming languages of the world wide web. It is a widely used scripting language (*) to make web pages more lively and interactive.

(*) A scripting language is a programming language suitable for writing small programs to perform common or one-off tasks.

What does JavaScript do?

JavaScript can update and change HTML and CSS programs. It can make calculations, manipulate and validate data. The programming determines whether all this is done automatically or triggered by an action of the visitor. The latter means that an action of the visitor triggers the execution of the script and causes an 'event' on the web page.

For example: With a mouse click or when hovering over a button the visitor changes colors on the web page, or texts are rolled out (>>> read more, menu dropdown), pop-ups appear or animations or effects are started. Or after entering numbers, calculations are made...

With only HTML and CSS this is not possible and a web page remains rigid and unchangeable.

Javascript Coding Macbook

JavaScript is client-side

JavaScript, like HTML and CSS, is a client-side scripting language. This means that the script is downloaded as code to the visitor's browser and executed there. This in contrast to "server-side" scripts like PHP. This is where the processing takes place within the server. Only after execution of the code, the result is downloaded to the visitor's browser.

JavaScript, AJAX and JSON

AJAX stands for Asynchronous JavaScript And XML. It is a combined use of JavaScript and XMLHttpRequest and is used for designing interactive web pages, in which asynchronous requested data are retrieved from the web server. As a result, such pages do not need to be refreshed in their entirety. This enables instant dynamic interaction with the visitor.

JSON stands for JavaScript Object Notation. It is a standardized data format. JSON was originally created from the JavaScript programming language, but is now a language-independent data format. JSON uses human-readable text in the form of data objects, which consist of one or more attributes with corresponding values. It is mainly used for data exchange between the server and the web application, as an alternative to XML.

Although AJAX is still widely used, modern implementations are making more and more use of JSON.

Javascript ≠ Java

The programming languages of JavaScript and Java are often confused because the name and syntax are very similar. However, this resemblance is superficial. They are very different languages.

The differences between Java and Javascript

  • Java is a programming language. Javascript is a scripting language.
  • Java is server-side, JavaScript is client-side.
  • Java code must be compiled before you can use it. Javascript is just plain text.
  • Java applications can run in a virtual machine as well as in a browser. Javascript code only runs in a browser.
  • A compiled Java program gets the extension .class. A Javascript has the extension .js.
  • Java was developed by Sun Micro Systems, JavaScript by Netscape.
Did you find this blog interesting?
Yes! :-)Not really!
Thank you. We received your proposal.
Something went wrong with submitting this form, please try again.