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.
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.
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.
Here is a quote from Tim O’Reilly, founder of O’Reilly Media:
- 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 :
var = "Hello";
Yes, I do think this is confusing. Why not just name them JS1 or JS2? PHP did it with PHP7 and Java with Java8.
Don’t do it. Don’t google them..
One last thing though.
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.