Beginning JavaScript Introduction

Note: in this article you will see me write JavaScript and JS alot. They are interchangeable and JS is the abbreviation of JavaScript.


JavaScript was created around April 1995 by Brendan Eich, who at the time was working on an early browser in a company called Netscape1.

He was told that he only had 10 days to design and code a working prototype of a programming language that can run on the browser.

His requirement is that the language would appeal to nonprofessional programmers like Microsoft Visual Basic (which had at least a year of design and development from 1990 to 1991) and interpretable for easy embedding in webpages.

The reason he was given only 10 days is because Netscape need to release their browser, which at the time was at war with Microsoft, whose objective was to gain browser market share.

(SPOILER: Netscape lose in the end. But JavaScript is already out in the wild.)

JavaScript is the first and only language that was supported natively by web browsers. Alongside HTML and CSS, it became the core technologies of the World Wide Web.

In the beginning, JavaScript was not as powerful as it is today, since it was mainly used to add interaction and animation for web pages.

It wasn’t until 2005 when jQuery and AJAX was released that JS saw rise in popularity. jQuery and AJAX simply had no alternative technology to compete with in terms of browser interactivity, DOM manipulation and asynchronous request.

With Google taking initiative to launch modern browser that’s far more capable than any other browser, and Facebook getting people online left and right (if only to use Facebook,) JavaScript had the responsibility to grow as well, to accommodate the ambitions of these successful Internet companies.

Browsers began developing APIs that can be used by JavaScript and only JavaScript (it’s the only language native to the web.)

Developers can retrieve information such as IP address and geographic location from the browser, while also storing information in the browser’s local storage.

Then another innovation happened.

A server side environment named Node.js was released into the world in 2009, unlocking JavaScript capabilities to be used in backend and server side development.

That makes JavaScript a competitor to long time server side programming language such as Java, Python, Ruby, PHP and many more.

JavaScript is now a language that can power the web, mobile and desktop applications. It can also interact with databases and embedded into devices.

Initiative had also been taken to make JavaScript a viable technology for machine learning and artificial intelligence development.

Here is a quote from Tim O’Reilly, founder of O’Reilly Media:

Learning JavaScript used to mean you weren’t a serious software developer. Today, not learning JavaScript means the same thing.

I bet you can already imagine the opportunities abound within JavaScript now.

The Definition of JavaScript

JavaScript is a programming language that is:

  • high-level: the language will store values in the memory and free them when they are not used anymore. It also had rich debugging capability and more platform agnostic. simply put, JavaScript will try to make everything easy so that you can focus on the code.
  • multi-paradigm: the language does not enforce its developers to use any particular programming paradigm. If you had used other programming language before, you will notice how Java and Ruby encourage the use of object oriented programming. They can use functional programming paradigm, it’s just not meant to be. But with JS you can write object oriented code using prototypes and classes. You can also use anonymous functions to write JS in functional programming style.
  • interpreted: means the language does not need to be compiled before running, as opposed to Java or Go. You can write it and then it will run.
  • dynamically typed: A variable in JS can be assigned any type. You can assign an integer to a variable that holds a string without any error. In Java you can only use String variable to hold String value.
  • weakly typed: In a strongly typed language, you have to declare a variable’s type on initialization, for example in Java you create one like this : String var = "Hello"; But in JavaScript, simply var = "Hello";

JavaScript Versions

If you ever surfed the Internet for JavaScript information, chances are you have heard of the term ECMAScript or ES being used to describe JavaScript.

I have a guide that explains what ES is, but suffice to say here that ES is the name of JavaScript standard.

So JavaScript is kinda like the name of the programming language, and it implemented a standard of rules and capabilities described in ECMAScript.

Yes, I do think this is confusing. Why not just name them JS1 or JS2? PHP did it with PHP7 and Java with Java8.

But no, in JavaScript, you would call them ES6, ES2015, ES2017, ES2018.. oh and ES6 and ES2015 are the same thing.

Don’t do it. Don’t google them..

One last thing though.

For a long time, the browser supports JavaScript up to ES3.

Right now, companies are developing support for higher version of JS.

But until the day come when JS highest version is supported universally on all browser, we will have to compile down our JS code into a version that’s capable of running on the web browser when we deploy them.

You will get to that later. For now, let’s dive into ECMAScript.

  1. JavaScript: Designing a Language in 10 Days ↩︎

Take your skills to the next level ⚡️

I'm sending out an occasional email with the latest tutorials on programming, web development, and statistics. Drop your email in the box below and I'll send new stuff straight into your inbox!

No spam. Unsubscribe anytime.