Thinking about JavaScript, first thing we think of is what is the difference between Java and JavaScript but when the JavaScript was created, it was created for entirely different purpose. In this blog we are going to learn about how the JavaScript got Java in it.
Java
The Java project was initially developed with the goal of creating a solution for interactive television. Originally called Oak, it was named after an oak tree that stood outside one of the core developer’s office. The project later changed its name to Green before finally settling on Java, which is a term associated with coffee.
In 1995, Sun Microsystems released the first implementation of Java. It quickly gained popularity due to its tagline “Write Once, Run Anywhere.” This meant that developers could write code once and run it on different platforms. Java also had a familiar C-style syntax, which made it easier for programmers to adapt to. Additionally, Java had the capability to run in web browsers using small programs called applets. This further contributed to Java’s rapid rise in popularity.
JavaScript in 10 Days
In the same year that Java 1.0 was introduced, a Netscape employee named Brendan Eich created a new kind of language. His task was to develop a language that could run directly in web browsers, unlike Java which needed separate Java programs to be loaded. The new language was also meant to be appealing to nonprofessional programmers.
While Java was becoming popular, Eich’s managers wanted a language that resembled Java. Eich made some changes to meet their request, but he also deviated significantly because he was designing it for a different purpose. He was creating a scripting language for non-professional developers that could be used on the client side of web applications, which was quite different from Java.
The Netscape team wanted to gain a marketing advantage, which is why they initially named the project Mocha. Later, they changed the name to LiveScript and eventually settled on JavaScript. This name change was a strategic move to benefit from Java’s popularity and create a connection between the two languages.
Java vs JavaScript
Java and JavaScript are two programming languages that can be used to build applications, although this is true for many other programming languages as well.
Java is a versatile programming language that is compiled, concurrent, strongly-typed, class-based, and follows an object-oriented approach. On the other hand, JavaScript is mainly used for web development. It is interpreted, single-threaded, loosely typed, prototype-based, and supports multiple programming paradigms.