Es6 arrow functions

1. Ordinary functions 1. First, let's talk about the use of ordinary function s 1.1 When we want to define a function, there are two ways to define a function (function function name () {}) (var function name = function () {}). For example, the following code defines fn1, fn2 var a=10; function fn1(){ co ...

Posted by kevin1 on Tue, 13 Sep 2022 21:23:09 +0300

ECharts Introduction to Data Visualization

Catalog One: What is ECharts 2: Introduction to Echarts 3. Main related configurations (commonly used) Fourth: Common charts for ECharts 4.1. Column Chart 4.2 Line Chart One: What is ECharts ECharts is a JavaScript-based database of data visualization charts that provide intuitive, vivid, interactive and customizable data visuali ...

Posted by badgoat on Sat, 02 Jul 2022 21:48:18 +0300

Summary of 9 common ES6 features (these are generally enough)

ECMAScript 6.0 (hereinafter referred to as ES6) is the next generation standard of JavaScript language, which has been officially released in June 2015. Its goal is to make JavaScript language can be used to write complex large-scale applications and become an enterprise development language. ES6 has brought us many unexpected functions. Here, ...

Posted by Gambler on Wed, 25 May 2022 00:25:11 +0300

ES6 Class Detailed Explanation

1. Class Introduction ES6 class can be regarded as just a syntactic sugar. Most of its functions can be achieved by ES5. The new class writing method just makes the writing method of object prototype clearer and more like the grammar of object-oriented programming. The data type of a class is a function, and the class itself points to a constru ...

Posted by BIOSTALL on Mon, 23 May 2022 03:29:07 +0300

5-ES6 destructuring assignment

Destructuring assignment is an extension to the assignment operator It operates on arrays and objects Advantages: code writing is simple and easy to read Overview Destructuring assignment is an extension of the assignment operator. It is a kind of pattern matching against arrays or objects, and then assigning values ​​to the variables. Th ...

Posted by Jeremias on Fri, 20 May 2022 04:38:53 +0300

Resolve node SyntaxError: Unexpected token

Resolve node SyntaxError: Unexpected token... (solve the problem that Node.js does not support the... Operator in the lower version) problem Our tmall elf service uses node JS. Today, I added a package nzh to the project. I was in package JSON, and then run npm install. After running, the nzh package will be installed, and other packages that n ...

Posted by xatter on Wed, 18 May 2022 10:56:37 +0300

ES6 loops and iterables

Author: Alan StormTranslation: crazy tech nerdoriginal: https://alanstorm.com/es6s-ma...Reproduction without permission is strictly prohibited This article will examine ES6's for ... of loops. old way In the past, there were two ways to traverse javascript. The first is the classic for i loop, which allows you to iterate over an array or any ob ...

Posted by SZero on Tue, 17 May 2022 19:07:58 +0300

AST reverse principle analysis babel

1. What is Babel Babel is a tool chain, which is mainly used to convert code written in ECMAScript 2015 + syntax into backward compatible JavaScript syntax, so that it can run in current and old versions of browsers or other environments. Here's what Babel can do for you: grammatical transformationAdd missing features in the target environmen ...

Posted by mad3533 on Tue, 17 May 2022 04:49:43 +0300

Object method commonly used in ES6: object keys(),Object.values() ...

1. Object.assign() Object.assign() is used to copy the values of all enumerable attributes from one or more source objects to the target object. Syntax: object assign(obj, ...sources) obj: target object sources: source object, which can be multiple Return target object Copy an object const obj = { a: 1 } const copy = Object.assign({}, obj) co ...

Posted by benji2010 on Mon, 09 May 2022 13:38:14 +0300

Study notes of React advanced guidance 4

Static type check image Flow and TypeScript These static type inspectors can identify some types of problems before running. They can also improve the workflow of developers by adding automatic completion and other functions. For this reason, we recommend using Flow or TypeScript instead of PropTypes in large code bases. (quoted from official w ...

Posted by u01jmg3 on Fri, 06 May 2022 00:55:49 +0300