javascript - doubility-sky/daydayup GitHub Wiki

ECMAScript (or ES) is a scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. It was created to standardize JavaScript to help foster multiple independent implementations.

JavaScript has remained the best-known implementation of ECMAScript since the standard was first published, with other well-known implementations including JScript and ActionScript.

ECMAScript is commonly used for client-side scripting on the World Wide Web, and it is increasingly being used for writing server applications and services using Node.js.

Learn

tutorial

books

coding style

Libraries

Frameworks

  • react, vue
  • Prototype is a JavaScript framework that aims to ease development of dynamic web applications. It offers a familiar class-style OO framework, extensive Ajax support, higher-order programming constructs, and easy DOM manipulation.

Projects

Compiler

  • Babel is a JavaScript compiler.
    • Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments.

Engine

  • V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
  • ChakraCore is an open source Javascript engine with a C API.
  • QuickJS is a small and embeddable Javascript engine. It supports the ES2020 specification including modules, asynchronous generators and proxies.
    It optionally supports mathematical extensions such as big integers (BigInt), big floating point numbers (BigFloat) and operator overloading.
  • jerryscript is a lightweight JavaScript engine for resource-constrained devices such as microcontrollers. It can run on devices with less than 64 KB of RAM and less than 200 KB of flash memory.
  • mJS is designed for microcontrollers with limited resources. Main design goals are: small footprint and simple C/C++ interoperability. mJS implements a strict subset of ES6 (JavaScript version 6)

Tools

FAQs

  • undefined与null的区别
    • undefined 和 null 在 if 语句中,都会被自动转为 false,相等运算符甚至直接报告两者相等。
    • JavaScript 的最初版本是这样区分的:
      • null 是一个表示"无"的对象,转为数值时为 0;
      • undefined 是一个表示"无"的原始值,转为数值时为NaN。
      • 但是,上面这样的区分,在实践中很快就被证明不可行。目前,null 和 undefined 基本是同义的,只有一些细微的差别。
    • 目前的用法
      • null 表示"没有对象",即该处不应该有值。典型用法是:
        1. 作为函数的参数,表示该函数的参数不是对象。
        2. 作为对象原型链的终点。
      • undefined 表示"缺少值",就是此处应该有一个值,但是还没有定义。典型用法是:
        1. 变量被声明了,但没有赋值时,就等于 undefined。
        2. 调用函数时,应该提供的参数没有提供,该参数等于 undefined。
        3. 对象没有赋值的属性,该属性的值为 undefined。
        4. 函数没有返回值时,默认返回 undefined。
  • 你真的会使用XMLHttpRequest吗?

Resources

  • awesome-javascript A collection of awesome browser-side JavaScript libraries, resources and shiny things.