Skip to main content

Command Palette

Search for a command to run...

Introduction to JavaScript (Part 1)

Published
0 min read
Introduction to JavaScript (Part 1)
E

Flutter | Laravel | Angular

What is JavaScript anyway?

JavaScript(JS) is a very powerful interpreted scripting language. It can be included into web pages to make them more interactive. JavaScript is one of the three pillars of web development, the other two being HTML and CSS. JavaScript is written in text and can be directly interpreted by the browser hence the reason it is called an Interpreted Language.

In interpreted languages, codes are run from top to bottom and the result of the running code is immediately returned. There is no need to transform or convert the code into a different form before it is run by the browser.

There is another term that comes up when interpreted languages are mentioned which is Compiled Language. A compiled language has to be transformed into another form before it can be run by a computer. An example is C and C++ codes, which have to be compiled(transformed) into assembly language before it's run by the computer.

Very Very Brief JavaScript History

JavaScript was created by Brendan Eich in 1995 during his time at Netscape Communications. The first prototype of JavaScript was completed in 10 days and was called Mocha, but renamed LiveScript in September 1995 and later JavaScript in December of the same year.

JavaScript was passed to the European Computer Manufacturers Association (ECMA) for standardization in 1995. About two years later, the first standard version of JavaScript, ECMAScript 1, was released in June 1997. In 1998 ECMAScript 2 was released but only editorial changes were made. ECMAScript 3 was released in 1999 which introduced lots of changes and additions such as regular expression, better string handling, new control statements, try/catch exception handling and other enhancements. ECMAScript 4 was developed as the next version of JavaScript but it was abandoned in July 2007. In 2009, ECMAScript 5 which came with lots of new features including support for the parsing of JSON, strict mode, getters and setters, new array methods, and more features was released. ECMAScript 6 was renamed to ECMAScript 2015, and this naming pattern has continued for the latest releases of the JavaScript standard. Over the years, ECMAScript has further seen the ECMAScript 2016, 2017, and 2018 versions all released in the month of June of their various years.

As of the time of this article, ECMAScript 2019 is the latest version of JavaScript.

JavaScript VS Java

JavaScript and Java are two different computer languages both developed in 1995. Java is an object-oriented programming language, which means it can run independently in a machine environment. Java is compiled into what Java calls bytecode. The Java Virtual Machine(JVM) interprets the bytecode into code that will run on computer hardware. Java can be used for Android apps, Enterprise systems and embedded functions for "Internet of Things" technologies(IoT).

JavaScript on the other hand is an object based scripting language. JavaScript Objects are prototype based. JavaScript is interpreted but not compiled. Every browser has the JavaScript interpreter to execute JavaScript code, for example Chrome uses V8 while Mozilla Firefox uses SpiderMonkey.

Why Learn JavaScript

  • Frontend Development: JavaScript has a handful of frameworks and libraries that can be used when it comes to frontend such as Angular, React, Vue, Ember, Backbone and more.
  • Backend Development: For backend, JavaScript also has a couple of notable frameworks such as Meteor, Express, Next.
  • Mobile Applications: JavaScript usage also extended to mobile app development. With frameworks like React Native, Native script, Tabris and more. These frameworks allows developers to build multi-platform applications.
  • Desktop Applications: JavaScript can not only be used for mobile app development but can also be used to create desktop applications. Frameworks like Electron, NW.js, Proton Native, and AppJs.

  • Game Development: The combination of JavaScript and HTML5 makes JavaScript popular in games development as well. JavaScript has many game engines to choose from to help with game development such as Phaser, Pixi.js, CreateJs , CraftyJs and many more.

Conclusion

In this article, we have been able to learn what JavaScript is, a brief history about it, how it defers from Java and why it's a good language to learn.

The next part of the series will cover basic JavaScript programming concepts like variables, data types, functions, conditions, loops and more.

If you enjoyed this piece, please share it, like it and watch out for the next part of the series.