In 1993, the National Center for SuperComputer Applications (NCSA) at the University of Illinois at Urbana-Champaign published NCSA Mosaic, the first popular graphical interface web browser that played a major role in popularizing the World Wide Web. In 1994, a company called Mosaic Communications was founded in Mountain View, California, and hired many of the original NCSA Mosaic developers to develop Mosaic Netscape, The company’s goal is to replace NCSA Mosaic as the world’s no. 1 web browser. The first version of the web browser, Mosaic Netscape 0.9, was released in late 1994. Within four months, it had captured three-quarters of the browser market and became the dominant browser on the Internet in the 1990s. To avoid NCSA’s trademark ownership issues, the browser was renamed Netscape Navigator that same year, and the company became Netscape Communications. Netscape foresaw that the web needed to become more dynamic. Marc Andreessen, the company’s founder, thought HTML needed a glue language that web designers and part-time programmers could easily use to assemble components like images and plug-ins, and code that could be written directly into web markup.

In 1995, Netscape recruited Brandon Eck with the goal of embedding the Scheme language into Netscape Navigator browsers [8]. Earlier, however, Netscape had partnered with Sunrise to support Java in Netscape Navigator, at which time there was a heated debate within Netscape [9]. Netscape’s decision to invent an auxiliary scripting language that works with Java and is syntactically similar [10] resulted in the exclusion of existing languages such as Perl, Python, Tcl, or Scheme. To defend the idea of JavaScript against other competing proposals, companies need to have a working prototype. Ike created the prototype in just ten days in May 1995.

Originally named Mocha, it was changed to LiveScript in the Beta version of Netscape Navigator 2.0 in September 1995, and in December of that year, When deployed in Netscape Navigator 2.0 Beta 3, renamed JavaScript[1][11], a consortium of Netscape and Sunsun Computers was formed to give the language a tie-in with the programming language “buzz word” Java, Therefore, it was temporarily renamed JavaScript, which later became one of the reasons for many misunderstandings about the language [12].

Microsoft’s adoption of JavaScript was so successful in browsers that the company soon launched JScript for Internet Explorer 3 to compete with market leader Netscape. JScript is also a JavaScript implementation, the coexistence of the two JavaScript language versions in the browser side means the lack of language standardization. In the early stage of development, the standard of JavaScript was not determined, at the same time, there were Netscape JavaScript and Microsoft JScript. In addition, Microsoft also added many exclusive objects in web technology, so that many web pages using non-Microsoft platforms and browsers could not be displayed properly [13][14]. As a result, during the browser wars, web designers would usually put “Best effect with Netscape” or “best effect with IE” signs on the home page [15]. With the release of Internet Explorer 4, Microsoft introduced the concept of dynamic HTML, but differences in language implementation and different proprietary document object models still remain, hindering the widespread use of JavaScript on the Web [13].

Standardization In November 1996, Netscape formally submitted language standards to ECMA (European Computer Manufacturers Association). In June 1997, ECMA developed the ECMAScript standard specification ECMA-262 based on the JavaScript language. JavaScript has become one of the best-known implementations of ECMAScript [16]. In addition, ActionScript and JScript are also the implementation languages of the ECMAScript specification. Although JavaScript is promoted and advertised as a scripting language for non-programmers, rather than as a scripting language for programmers, JavaScript is very rich in features. In 1994, Netscape released version 0.9 of its Navigator browser. It was the first full-fledged web browser in history, and it was a hit. However, this version of the browser can only be used for browsing and does not have the ability to interact with visitors. . Netscape desperately needed a web scripting language that would allow browsers to interact with the web. What is a Web scripting language? Netscape had two options: one was to take existing languages like Perl, Python, Tcl, Scheme, and so on, and allow them to be embedded directly into web pages; The other is inventing a whole new language.

Both options have their pros and cons. The first option is easier to promote by taking advantage of existing code and programmer resources. The second option, which favors a fully applicable language, is easier to implement.

Netscape’s management struggled to make up its mind about which option to pursue.

That’s when another big thing happened: Sun introduced the Oak language to the market in 1995, renamed Java.

With Sun’s hype that it could “Write Once, Run Anywhere,” it seemed likely to dominate the future.

Netscape was moved and decided to form an alliance with Sun. Not only does it allow Java programs to run directly in the browser as applets; I even considered embedding Java directly into web pages as a scripting language, only to abandon it later because it would have made HTML pages too complex.

Anyway, the situation was that the entire management of Netscape was Java believers, and Sun was completely involved in the web scripting language decisions. As a result, Javascript was later brought to market by netscape and Sun, and it was no accident that the language was named “Java+ Script “.

Enter Brendan Eich, a 34-year-old systems programmer. Netscape hired him in April 1995.

Brendan Eich’s primary interest and interest is functional programming, and netscape recruited him to investigate the possibility of using the Scheme language as a web scripting language. Brendan Eich himself felt the same way, assuming that he would be working primarily with Scheme when he arrived at his new company.

Just a month later, in May 1995, Netscape decided that the web scripting language of the future would have to “look similar enough to Java” but be simpler enough to make it easy for non-professional web authors to learn. This decision effectively excludes non-object-oriented programming languages such as Perl, Python, Tcl, and Scheme.

Brendan Eich was designated as the designer of this “simplified Version of the Java language.”

However, he has no interest in Java at all. He designed Javascript in just 10 days to meet the company’s demands.

Because the design time was too short, some of the details of the language were not carefully considered, resulting in a long time later, Javascript written programs chaotic. If Brendan Eich had foreseen a future in which this language would be the number one language on the Internet, with millions of learners worldwide, would he have taken a little more time?

In general, his design idea goes like this:

(1) Learn from the basic syntax of C language;

(2) Use the Java language for data types and memory management;

(3) Using Scheme language to upgrade functions to the status of “First class”;

(4) Use Self language for reference and inheritance mechanism based on prototype.

So the Javascript language is really a hybrid of the two language styles —- (simplified) functional programming + (simplified) object-oriented programming. This was decided by Brendan Eich (functional programming) and Netscape (object-oriented programming).

Years later, Brendan Eich still despises Java.

He said:

“The main impact of Java was the separation of data into primitive types and object types such as strings and string objects, and the introduction of the Y2K problem. That’s unfortunate.”

Whether it is desirable to wrap primitive data types as objects is a matter of the moment. The Y2K problem is directly related to Java. It is assumed that date.getYear () should return the last two digits of the year:

Var date1 = new Date(1999,0,1);

Var year1 = date1. GetYear ();

Alert (year1); / / 99

But actually, for the year 2000, it returns 100!

Var date2 = new Date(2000,0,1);

Var year2 = date2. GetYear ();

Alert (year2); / / 100

If you use this function to generate a year, some web pages may produce results like “19100”. The problem is entirely Java, because Javascript Date classes directly use the java.util.Date library. Brendan Eich was apparently unhappy with this result, which later led to the addition of a date.getFullYear () function that returned a four-digit year.

Brendan Eich would never have used Java as a prototype for his Javascript design had it not been for his company’s decision. As a designer, he didn’t like his work at all:

“I don’t so much love Javascript as hate it. It’s a one-night stand between C and Self. Dr. Johnson, the English writer of the 18th century, said it well: ‘Its excellence is not original, its originality is not excellent. ‘the part that is good is not original, and the part that is original is not good.”