What on 🌐 is JavaSrcipt? 😡

Home / What on 🌐 is JavaSrcipt?


JavaScript is a synchronous, single-threaded language.

➑ History 🌍

➑ Current Status πŸ’«

➑ Defination πŸš€


History 🌍

To understand JavaScript we have to go waaaay back to its creation!
JavaScript is a scripting language written by Brendan Eich in 1995 for the Netscape Navigator browser under the working name of β€œMocha”. After being renamed to β€œJavaScript”, it was standardized by ECMA International as ECMA-262 or ECMAScript in 1997. The authoritative group of people/organizations in charge of the standard is known as TC-39.

And then God said, β€œLet there be JavaScript”

Over the next 25 years, it would see a variety of highs and lows. The most notable releases include

➑ ES1 1997.
➑ ES2 1998.
➑ ES3 1999. The longest-standing version of early JS. ➑ ES4 Never finalized.
➑ ES5 2009. Added JSON, strict mode, functional array methods, and more.
➑ ES6 2015. Added classes, promises, arrow functions, let/const, and much more.
➑ ES7, ES8, ES9, ESNext. Modern updates are now being released annually.

You can learn more about ECMAScript here.

This establishes the fact that it has nothing to do with Java. πŸ€—

Current Status πŸ’«

JavaScript is continuously being developed with new additions added to it with every iteration. This is what makes it the most hated/loved language in the world!

Defination πŸš€

Let’s breakdown the various key terms associated to JavaScript:

βœ… High-level

JavaScript is a high-level programming language. It essentially means that when you run a JavaScript code you don’t think about allocating memory or getting a thread from the CPU to run your code. In other words, the level of abstraction is provided by a programming language. You get features like garbage-collectors, dynamic-typing which simplify a programmer’s job.

βœ… Interpreted

JavaScript is a JIT or Just-In-Time compiled language.

βœ… Weakly Typed

Unlike most programming languages, JavaScript is weakly typed. It simply means the datatypes become known at runtime.

Here is a small example

// JavaScript
let message = "Keep smiling! πŸ˜„"; // πŸ‘ˆ Notice we don't mention a datatype.
const happiness = 100; // πŸ‘ˆ Notice we don't mention a datatype.

function add(a, b) {
  // πŸ‘† Notice we don't mention the datatypes of the return value.
  return a + b;
}
// Java
String message = "Keep smiling! πŸ˜„"; // πŸ‘ˆ Notice we mention a datatype, String in this case.
int happiness = 100; // πŸ‘ˆ Notice we mention a datatype, int in this case.

int add(int a, int b) { // πŸ‘ˆ Notice we mention the datatype of the return value, int in this case.
  return(a+b);
}

The type is associated at the run time value. This creates a huge ruckus for programmers 🀬! Here is where TypeScript comes to rescue. It is a strongly typed language and transplies the TypeScript code to JavaScript code.

Read more about TypeScript here.

βœ… Single-Threaded

JavaScript is a single-threaded language. So it can only do only ONE computation at a time. When a JavaScript. To combat this, JavaScript implements the concept of Event Loops

βœ… Synchronous

JavaScript is Synchronous, this essentailly means that each code runs line-by-line.


Lets recapitulate πŸ“:

➑ JavaScript is a high-level, weakly typed, interpreted, synchronous, single-threaded and JIT programming language.

➑ To overcome its blocking feature it implements Event Loops.

Read more here.


See also

⚫ Event Loop. πŸ” 😡 Read β–Ά
⚫ Closures Read β–Ά