In the 1990s, Netscape Navigator dominated the Internet browser market. Websites at that time were built using only simple HTML and CSS, lacking interactivity, and even simple calculations required connecting to the server. It was in this context that JavaScript was born.
Marc Andreessen, the founder of Netscape, decided to create a programming language for browsers to perform simple calculations on the browser side. To do this, he hired Brendan Eich in 1995. In just ten days, Eich created a new programming language, initially named Mocha, later renamed LiveScript, and finally JavaScript.
When Marc Andreessen started the JavaScript project at Netscape, Java was very popular. Therefore, LiveScript was renamed JavaScript. But it must be remembered that Java and JavaScript are different languages.
JavaScript, designed by Brendan Eich, is an interpreted language, which means that the interpreter reads the code line by line and displays the output. In contrast, a compiler compiles the entire code at once, producing an executable machine code file.
An interpreter is slower compared to a compiler because it executes the code line by line. Whereas the compiler is faster because it compiles the entire code in one go and generates the output.
After 2008, Google launched the Chrome browser, which used the V8 engine, which combined interpretation and compilation methods. This makes JavaScript code execute significantly faster and makes it more popular.
Jeff Atwood, the founder of Stack Overflow, once said a famous saying:
Any application that can be written in JavaScript will eventually be written in JavaScript.
The above is the detailed content of History of JavaScript. For more information, please follow other related articles on the PHP Chinese website!