JavaScript Programming Language: Technologies’ Very Own Mt Everest

    3
    485
    javascript programming language

    When you stand at the base of Mt Everest, you can’t see the peak! JavaScript programming language has a similar take on its ascent of becoming popular- technologies’ very own Mt Everest.

    Before getting started, I must quote “JavaScript is Everywhere”. Desktops, laptops, mobile, tab, you name it and you can find JavaScript running on all these things in one way or another.

    It is more famous than Avatar, is more read than Harry Potter or The Lord of the Rings, and is more viral than any other meme on this planet. Chances are that article which you are currently reading or all the web pages which you have just clicked to get to this article; or even the dozens of other websites which you’ll be going to browse before buying your next dress is because of JavaScript. Today, actually JavaScript programming language is the internet or at least the essential part of the internet.

    But, how JavaScript become so huge?

    The Initial Days

    Internet- the early days

    Let’s go to the very beginning from where it all started “The Internet” or “The Beginning of Internet Era”. The concept of the internet was forwarded in 1962 and was devised in 1969; back then it was known as ARPANET wherein, ARPA was the acronym of Advance Research Projects Agency. It was used to link 4 main computers of 4 research headquarters in SouthWest USA.

    Following the creation of the internet, several other developments took place such as FTO, Gopher, TCP/IP protocol and so on. Thanks to all these advancements, ARPANET became the Internet which connected the network of computers for universities and the military. In 1989, Tim Berners-Lee proposed The World Wide Web (using the HTTP protocol for retrieving hyperlinked documents) at the European Laboratory for Particle Physics. He also created the first browser as a tool for the transmission of text-based information using the HTTP protocol.

    After this, in 1993, the NCSA Mosaic browser was developed which promised to offer the use of images, colors, hyperlinks and plain texts. It became the first browser which ran in a graphical interface environment. Then to tackle the NCSA Mosaic browser, Netscape was established in 1994. The aim was to create the proprietary browser called Netscape Navigator which can overshadow the NCSA Mosaic Browser.

    Competition

    For this, Netscape hired the employees from the NCSA. Soon, Netscape Navigator becomes popular throughout the world. This was the time when Marc Andreessen (founder of Netscape Communications) had the vision that the web should be more dynamic. He thought animations, interactions and other small automation can take the web to the next level.

    To make all this a reality, the web needed a small scripting language which can interact with the DOM, was simple, dynamic and also accessible to non-programmers. And, so the idea of Mocha (which will later be known as JavaScript) was born. In 1995, Netscape hired Brendan Eich who later became the father of the JavaScript programming language. Netscape also collaborated with Sun Microsystems so they could include Java (by then, it was very popular) in Netscape Navigator.

    So, if Java was already there then why to create a whole new language of JavaScript?

    At that time, Java was not suited for the scripters, amateurs, designers. Java was too big and was too enterprisy for them. Here, the idea was to make Java for professionals and component writers whereas, Mocha could be used for small scripting tasks. In simple words, Mocha was proposed as a scripting companion for Java, similar to the relationship between C/C++ and Visual Basic.

    Here’s a Brief About The Creator: Brendan Eich

    Brendan Eich
                                                                    Brendan Eich

    The creation of JavaScript programming language was no less than mythological or at least miraculous than any other achievements made by humankind. The ultimate success of this language goes to its creator: Brendan Eich.

    Eich was born on July 4, 1961 (Independence Day in the USA) in Pittsburgh, and then studied mathematics and computer science at Santa Clara University. Later, he received a Master’s Degree from The University of Illinois. In upcoming years, he used his extensive knowledge of Mathematics and computer science to create a programming language which will change the face of the internet to its entirety.

    It may take years of hard work for creating something revolutionary or for some it may even take just 10 days. The latter became true for Brendan Eich. He created a programming language in just 10 days which for the users will be truly something to ponder.

    Read More: Best E-books to Learn JavaScript programming language

    Back to JavaScript

    Brendan Eich Quote

    Back then, there was a serious competition for dominating the web with web browsers. From AOL to Microsoft Internet Explorer to Netscape, everyone was competing to conquer and dominate the web with a reign supreme.

    Because of this, Eich was told to create a prototype quickly which will give Netscape an extra edge over others. There was a lot of pressure to pick any one language as Python, Scheme, Tcl were all the possible candidates. After numerous decisions, JavaScript a.k.a. Mocha was born. Within a week, its prototype was functional and was integrated into Netscape Communicator in May 1995. Soon Eich and others realized that what was meant for the browser has turned into something very different and powerful. Mocha was not like a Scheme at all and looked like a dynamic Java, but underneath it was a very different beast.

    Read More: 10 Essential JavaScript Functions You Need To Know

    The Name Dilemma: Mocha? LiveScript? JavaScript? Or ECMAScript?

    Name in different languages

    Yes, initially JavaScript programming language was not called JavaScript but the Mocha. Since its implementation, Mocha went through a few notable changes in regard to its name.

    The first change, when Mocha was renamed to LiveScript. It was changed mainly because of trademark reasons. Then, already some products had the prefix “Live” and were convenient for marketing too. LiveScript also sounded more active, snappier and livelier.

    Afterword, in early December 1995, they renamed it to JavaScript. It was mostly for the advertising purposes as the name included Java in the prefix. However, the JavaScript programming language was not related to Java at all.

    Though, everyone still calls it JavaScript to this day, it was ECMAScript which became its official name. It is because when Netscape went to ECMA for standardizing JavaScript; they asked them to use their name.

    Since then, JavaScript or ECMAScript exploded and went on to dominate the whole technology sector.

    JavaScript was not Similar to Java

    JavaScript is not Java

    Virtually, JavaScript has nothing to do with Java despite the similarities in their names. It was named JavaScript as an advertising gimmick to associate itself with Java (then-more-popular language) which has stuck with the programmers.

    Brendan Eich also compared this as a sidekick becoming superhero or Robin replacing Batman. Today, Java is not much in the game but JavaScript is still dominating the game from the front.

    Despite sharing C like syntax, some key differences among these two programming languages are as follows:

    • Java is a strongly typed language where variable must be declared first while JavaScript is a loosely typed language with a more relaxed syntax and rules.
    • Java is an object-oriented programming language and JavaScript is an object-based scripting language.
    • Java-based apps can run in any virtual machine or browsers whereas, JavaScript code runs only on a browser.
    • Java Objects are class-based and JavaScript objects are prototype based.
    • The Java-based program uses more memory whereas the other one uses less memory making it useful for web pages.
    • For concurrency, Java has a thread-based approach and JavaScript has an event-based approach.

    Read More: 12 Popular JavaScript Libraries to Know

    JavaScript Versions

    Versions of JavaScript

    The first big change after the public release of JavaScript came after the ECMA standardization. This standardization was an essential step for JavaScript as it opened the door to the wider audience.

    ECMAScript 1 and 2

    The first version came in June 1997 and missed major features like regular expressions, JSON, exceptions, and methods for builtin objects. The next version was released to fix the inconsistencies between ECMA and the ISO standard for JavaScript in June 1998.

    The Arrival of ECMAScript 3

    Since its release in Dec 1999, it brought the major changes like regular expressions, the do-while block, exceptions, built-in functions for strings and arrays, formatting for numeric output, better error handling and much more. It was also supported by all the major browsers of that time and was the baseline target for many libraries. For many years, this version spread far and wide.

    Years of Struggle with ECMAScript 3.1 and 4

    Sadly, the forthcoming years were not good for JavaScript as strong differences between the JavaScript committee grew. Some believed that this language needed new features to become more powerful while others thought this was not the appropriate course for JavaScript. This pushed the released date of ECMAScript 4. At the peak of the development, ECMAScript 4 possessed features like classes, interfaces, packages, structural types, multimethods, iterators, generators, destructuring and so on.

    The Rebirth of JavaScript with ECMAScript 5

    After all the years of struggle of ECMAScript 4, the community started focusing on ECMAScript 3.1 and renamed it to ECMAScript 5 to avoid any later confusion. Soon, it becomes the most supported versions of JavaScript and the compiling target for numerous transpilers. It was completely supported by Firefox 4, Chrome 19, Safari 6, Opera 12.10 and Internet Explorer 10. Among its different features, it included getter/setters, JSON, function bind, new array methods, new object methods, and others.

    The Latter Versions: ECMAScript 6, 7, 8 & 9

    Now, it has become a general-purpose programming language. Many ideas from ECMAScript 4 were canceled in ES6 and it was later renamed as ECMAScript 2015. Its release caused a huge jump in the use of transpilers like Babel or Traceur. Some of its new features were Let (lexical) and const (unrebindable) bindings, arrow functions, classes, template strings, promises, spread syntax, module syntax, symbols, typed arrays and simpler unicode support.

    The later versions were released in the year 2016, 2017 and 2018. All of these versions were loaded with more features. The ninth edition of ECMAScript (2018) included features like asynchronous iteration, object rest/spread properties, promise.finally (), Regular Expression lookbehind Assertions and others.

    Read More: The New ECMA 2018 Javascript Features

    The Dawn of NodeJS

    NodeJS- The Game Changer

    Already the JavaScript programming language was widely used by web developers throughout the world for upgrading their web pages. Now developers can play with animations, cool interactions and can perform magic in the browser using their logic and algorithms. It assisted in creating full-blown apps which don’t require any software to accomplish tasks. You can navigate to numerous websites and can use tools and access all the information from your browser itself. It literally killed the need for expensive software and officially, web applications were born which kept the entire world happy.

    Soon, developers started pushing the limits, but the browsers failed to keep up the pace. At this very moment of time, Google came to rescue. They reinvented the browser (Google Chrome) from the ground up. They build the actual JavaScript interpreter in 2008 as a stand-alone project and called this new engine “V8”.

    V8 was awesome! V8 was fast! V8 was stable! And V8 was beautiful too! Then in 2009, Ryan Dahl at Google had a brilliant idea of moving V8 to the server-side for executing the JavaScript programming language on the server. The idea was based on “One Language For All” and changed the complete philosophy of programming languages. The JavaScript programming language has become a full-fledged programming language for all the intents and purposes with all the necessary capabilities.

    For this Ryan took V8 to the server and built a small layer around it for managing the runtime capabilities of the JavaScript programming language on the server. He named it NodeJS and this was the beginning of another cool concept revolving around JavaScript. Now, this programming language can be used for both server and client side which was nothing less than a miracle for developers. By then, they were using different programming languages for front-end and back-end web development.

    According to Wikipedia, “Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser”.

    Read More: About NodeJS, IDEs, Benefits and Its Applications

    Features of JavaScript

    JavaScript Features

    From the programmer’s point of view, there are literally myriads of JavaScript features which makes their life easy. Some of the notable ones are:

    • Light-weight and fast
    • Object-based scripting language
    • Gives more control over the browser
    • It is case sensitive
    • Provides predefined objects
    • Control statements syntax is similar to syntax of control statements in C language
    • Can create new functions within scripts
    • JavaScript can be used as a multi-platform language
    • Rich interface with drag-and-drop components
    • Powerful frameworks like Angular, React, Vue and others

    Read More: Advantages and Disadvantages of Full-Stack JavaScript

    Top JavaScript IDEs and Source Code Editors

    IDEs or Editors are the tools which allow programmers to write the codes, compile the codes and debug the codes. Various people confuse IDEs with text or code editors however, both of them are different in many aspects.

    IDE is basically a complete environment for programming consisting of number of tools which make any programmer more productive. Mostly, these IDEs comes with a source code editor, compilers, debuggers and tons of other features. Whereas, a code editor comes with less functionality but is more fast and lightweight than any other IDE. Despite the differences, a programmer uses both IDE and editors for programming depending upon their needs.

    In the below image you can find some of the widely and popular used IDEs as well as code editors.

    Best JavaScript IDE & Code Editors

    Now, Let’s Compare Some of The Codes of Modern JavaScript programming language with its Earlier Versions

    Instance 1: Shortcut notations for generating objects

    Old Way:

    New Way:

    Instance 2: Ternary notation for conditions

    Old Way:

    New Way:

    Instance 3: Task of finding the largest number in an array of numbers

    Old Way:

    New Way:

    – (without a loop):

    – (Another interesting method is Math.max(). This one returns the largest number from a list of parameters)

    Wrapping Up!

    I went into this story in search of finding the antiquity of the JavaScript programming language; end up discovering the chronicles of a man who cobbled together the seed of a programming language that would grow into a tree which anyone can ever imagine. As of now, this language has moved to unprecedented heights and became the biggest mountain of the World Wide Web; technologies’ very own Mt. Everest.

    Out of everything, which really startled me was the fact that Brendan Eich created this programming language in a brief stint of a mere ten days. This feat has a legendary aura surrounding it which will grow by every passing day.

    Indeed, what started as a competition to rule the internet in the form of browser ended with one of the most popular, used and read programming language in the world. Despite all the heated competition and all the setbacks, today JavaScript programming language has eventually crossed all the borders and implanted itself in all the possible browser. Some of the technologies like NodeJS or V8 or any other developments have played an integral role in its popularity and today, its community is as active as ever.

    Already, various future proposals have been made which are ready to take JavaScript to the next unimaginable level. In forthcoming years, it would be really interesting to see that whether this language will go in the history books similar to other old technologies; or else, will evolve into something more powerful, more versatile and more effective.

    3 COMMENTS

    1. Using numbers.sort for finding the maximum is pretty inefficient. Sorting is O(n log n), finding the maximum with ES5 Math.max.apply(null, numbers) or ES6+ Math.max(…numbers) is O(n) just like the “old” loop.

    2. […] is also sometimes referred to as React.JS or ReactJS. It is no ordinary library as it has taken JavaScript to unimaginable heights with all its features and usefulness in terms of web-app […]

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here