Introduction to JavaScript
History
In 1995, people went crazy to get latest version of Windows 95. At that time there were only HTML websites having no function, so in order to even do basic operations, the websites were needed to send request to data server, and it was in the data server where all of this computation and business logic happened, and then it would return the web page that contained the new data.
Now the team at Netscape wanted something a little bit different (Netscape was biggest Internet company at that time). They envisioned a future where the web was more dynamic, with animations and real time user interaction. And in order to enable this we need to take away the server and have the code be able to run on the browser. So, in order to do this, they wanted to create a small scripting language.
The requirements were that this language had to be simple and had to be really easy so that even non-developers and non-programmers could use it to add functionality to web sites. So, they contracted this guy, Brendan Eich, to create that programming language. And, as internet history and internet lore go, Brendan proceeded to sit down with the team, and while there were other people who tried to lose a guy in 10 days, Brendan was able to create JavaScript in10 days.
JavaScript wasn't even always called JavaScript. In fact, when Brendan first created it, it was actually called LiveScript, and then the people at Microsoft decided to try and reverse engineer the program and they ended up with something called Jscript. And so, there were all the slightly different versions of JavaScript that was being run on the web and it was starting to get quite confusing.
So, the Europeans did what Europeans do best and they decided to standardize the language. And that's where you get the ECMAScript from. And that stands for the European Computer Manufacturers Association Script. And the only reason why this is interesting is that often as we can see different versions of JavaScript not referred to as JS5 or JS6 but as ES6 or ES7, and the ES comes of course from ECMAScript.
Why is it called JavaScript anyways?
What does the script stand for?
Well, just as you have scripts in plays where it tells the actors what they should do, the scripting languages does much the same thing with regards to web sites.
Is JavaScript similar to Java? And what exactly is their relationship?
Java and JavaScript have about as much in common as car and carpet. And the only reason why JavaScript was called JavaScript was because in the 90s the word Java was about as hot as the word blockchain in today's world. everybody wanted the word Java in their name. But JavaScript and Java actually have some big differences. And the main difference is that JavaScript is an interpreted programming language whereas Java is a compiled programming language. Now whereas in the olden days interpreted languages tend to be seen as almost like toy languages. They weren't so powerful. They were very slow and they had to execute all the instructions line by line whereas compiled languages were seen as the more serious languages and you end up with very fast running programs.
Now today modern JavaScript is used in all sorts of places, whereas traditionally it was a front-end language that was meant to add some animations to your web site or allow a little bit of user interaction. JavaScript can be seen in frameworks ranging from the front end to the back end and everything in between.
A great thing about JavaScript is that it's the one language that is supported by all of the major browsers. While we can use other languages that can be compiled into JavaScript and run on the browser, it is still the language that powers the web, and this is evident from the popularity of JavaScript.