Home > Article > Web Front-end > JavaScript - Pioneers of Netscape Nodejs
Ref: http://blog.kueiapp.com/programming-tw/javascript-PIONEERS-netscape-nodejs/
JavaScript 1.0 was invented by Brendan Eich of Netscape in 1995 for the famous browser Netscape. Java was a very popular language at that time, so Netscape wanted to be as cool as it was and named it JavaScript. However, they have absolutely nothing to do with each other.
Microsoft released two languages that can be executed on the browser in 1996, VBScript and JScript. JScript is actually a clone of JavaScript, used in Internet Explorer 3.
In order to formulate JavaScript standards, Netscape proposed the first global standardized architecture to ECMA International in 1996, and completed the first released version (ES1) in 1997. They call it ECMAScript, the global standard for JavaScript. From the first version to 2022, the most popular version is ECMAScript 2015 (also known as ES6), supported by the most browsers.
Different versions of JavaScript will have different syntax, functions, libraries or module systems. To check if our environment can perform it, caniuse.com is a great web information site.
ESMAScript (JavaScript) Candidate List
In 2008, Google released the Chrome browser, and its JavaScript V8 rendering engine dropped a shock bomb to the online world. Due to the "open source" nature of V8, the NodeJS team modified the engine so that it can easily handle web applications and create servers for back-end applications.
Due to the emergence of NodeJS, the application of JavaScript is not limited to browsers. Server-side service providers can also use JavaScript. Coding style is not limited to web formats, and many NodeJS applications bring the concept of module programming into the JavaScript world.
Different from the function library, when talking about a module Module, it usually contains a category or a set of functions to achieve a certain purpose. Furthermore, since the JavaScript world is a free and open platform, there are many styles of Modules in JavaScript.
As time goes by, import and require become the two mainstream modes when using JavaScript Modules.
CommonJS style is the earliest writing method that gave rise to the concept of modules.
// a.js const module = require('module'); module.hello() // module.js function hello(){ console.log('hello') } module.exports = { hello }
In the latest ES6 standard, modules can be written as import and export, which seems easier to understand.
// a.js import module from "module" module.hello() // or import { hello } from "module| // module.js export function hello(){ console.log('hello') } // or export { hello }
NodeJS is an independent execution environment. After installation, we can use the node command to execute JavaScript code in the terminal without a browser.
node hello.js // or omit the extension node hello
Ref: http://blog.kueiapp.com/programming-tw/javascript-PIONEERS-netscape-nodejs/
The above is the detailed content of JavaScript - Pioneers of Netscape Nodejs. For more information, please follow other related articles on the PHP Chinese website!