A programming language born in ONLY 10 days has grown in use for both inside and outside of the browser. The invention of NodeJS opened the possibilities of using JS for backend development. Learn all about its background and rise here.
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 JS is already out in the wild.)
Then another innovation happened.
Initiative had also been taken to make JS a viable technology for machine learning and artificial intelligence development.
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 :
String var = "Hello";But in JS, simply
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.
For now, let’s dive into ECMAScript.