JavaScript Intro

Get introduced to JavaScript. The language that powers the internet.

Introduction To JS

This article will talk about JavaScript - the language that powers the internet. JavaScript is a scripting language that adds functionality to websites. It was made by Brendan Eich, who made it so simple that programmers and even non-programmers could use it to add functionality to their websites.

JavaScript has become so popular that if you happened to turn it off on your browser, most sites, like YouTube and Netflix, would crash. Leave alone the site; ads run the internet as we know, and funny enough, ads will only run with the help of this programming Language. This shows you how dependent we have become on this language to run our daily tasks efficiently on the internet

A Brief History of JavaScript

In the early days of JavaScript, the language was known as LiveScript, and different companies like Microsoft tried to reverse-engineer the language. As a result, different versions of the language were running on the internet, i.e., from LiveScript to Jscript to JavaScript. These many versions of the language started to become confusing, and that is when the European Computer Manufacturers Association (ECMA) decided to standardize the language. So they came up with the ECMA Script to even things out. This is why JavaScript versions are named JavaScript ES5 or ES6 instead of JS5 and JS6.

With that short introduction to JavaScript, let us dive deep into the core functionality of this language and see how it works.

How does JavaScript Work?

Just like a movie's Script that tells the actors what to do and when to do it, JavaScript does the same thing with websites, but instead of using actors as the characters, the HTML elements are the characters.

For example:

Let's say we want to make a website that greets the user when they visit its URL and thanks them for visiting. This is how it would play out.

The user visits the site's URL, and after 2 seconds, an h1 tag should appear saying Hello, then after another second, a p tag should appear saying "World." 3 seconds later, the text should change to "Thank you for visiting"

In code:

The user visits the website
2 seconds delay
Unhide H1 tag <H1>Hello</h1>
1-second delay
Unhide P tag <p>World</p>
3 seconds delay 
Hide the P tag
Change the H1 tag to "Thank you for visiting."

Is JavaScript the same as Java?

These are two different languages operating under very different architecture. They are not related in any way. The only similarities is that they are both programming languages and they share the word Java in their names thanks to the popularity of the word Java back in the days. Every company wanted to be associated with the name.

These two programming languages have several differences starting from the fact that JavaScript is an interpreted language while Java is a compiled language.

Where Does JavaScript Stand today?

While interpreted languages were seen as toy languages in the 90s, where the code would have to execute line by line leading to very slow programs, compiled languages were the more serious languages that would give you fast-running codes.

Well, that is not the case anymore. JavaScript is now not only a front-end language that can add some animations to your website but it is also used in frameworks starting from the front-end to the backend.

Modern JavaScript has become very popular considering that it is the only language that is supported by all the major browsers on the internet giving it a boost.

Ending ...

In this article, We have looked at an introduction to the popular JavaScript language and seen its benefits. It powers the internet, so I need not say that it is essential when creating websites and web apps. More on JavaScript coming so stay tuned.

That is all for this article, If you found it helpful, share it with others who might find it interesting and leave us a comment below.

Thank you for reading!!

If you enjoy our content, please consider buying us a coffee to support our work:

Table of Contents
Great! Next, complete checkout for full access to GeekBits.
Welcome back! You've successfully signed in.
You've successfully subscribed to GeekBits.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.