Introduce the differences between Set, Map, WeakSet and WeakMap

1.set Basic Usage ES6 provides a new data structure Set. It is similar to an array, but the values of members are unique and there are no duplicate values. Set itself is a constructor for generating Set data structures. const s = new Set(); [2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x)); for ( ...

Posted on Thu, 25 Jul 2019 01:08:51 -0700 by adiwood

JavaScript Functional Programming

1: Basic concepts Functional programming is a programming way of thinking, not some grammatical rules. It encapsulates functions for high reusable functional codes to achieve high reusability (the main purpose). Functional programming features: Function is the first class citizen, because it is called functional programming, so function is the ...

Posted on Wed, 24 Jul 2019 23:20:26 -0700 by Eric_Ryk

TypeScript Learning 6-Function

Introduction Functions in TypeScript and in JavaScript are not much different from other features. A little advanced knowledge will be added here. Function-related knowledge points Here are some knowledge points about functions in TypeScript. Type declaration Function definitions in TypeScript need to declare the types of parameters and return ...

Posted on Tue, 23 Jul 2019 04:11:29 -0700 by chuckym7

Single Page Routing Switching Principle/Simple Implementation

Preface Recent react learning, when using react-router-dom, the principle of history and routing handover implementation are not understood, after learning to sum up! If you just use the following principles of react with history, you probably won't use them. But when you need to use your own history or a third-room history, you need to unders ...

Posted on Mon, 22 Jul 2019 22:04:12 -0700 by akrocks_extreme

Deep JavaScript Modular Programming

Original Link: http://www.cnblogs.com/coolkiss/p/3476687.html Looking at the manual of requirejs website today, I found this good article below, so I took some time to translate it. Please correct the translation, thank you!   Recommend ...

Posted on Mon, 22 Jul 2019 13:34:36 -0700 by BoostinZX

Web pack usage record -- tired

Webpack: A front-end resource loading/packaging tool. It will do static analysis according to the dependencies of the modules, and then generate the corresponding static resources according to the specified rules. To simplify the complexity of development, many good practices have emerged in the front-end community: modularization ...

Posted on Sat, 20 Jul 2019 19:23:29 -0700 by efron

js-cookie source learning

This article was originally published on my own website. js-cookie library source code learning background Recently, when working on a project, the front-end login function has to do a password-remembering function. But this function is not implemented in the development framework, so I want to implement this function myself. In fact, it is ver ...

Posted on Sat, 20 Jul 2019 03:05:45 -0700 by sethcox

Embedding YouTube Video Player in Android

There are not many articles about integrated Yoube video development on the Internet. So today I share with you the problems and implementation code that I encountered in my development. Application Running Environment: Android TV and Android Mobile This is the entrance to the developer zone. The above ...

Posted on Thu, 18 Jul 2019 19:30:00 -0700 by navinj

Implementation of pipe Processing Array in Node.js

TLDR;The style of this article is to salute Mr. Jim; salute, salute, understand, not plagiarism, how can a programmer's business be called plagiarism?Of course, Node.js stream s are also on sale. There are some inappropriate uses. Please point out.Links to the original text Welcome to star. The original intention of this article is to look at S ...

Posted on Wed, 17 Jul 2019 15:54:14 -0700 by Repgahroll

Node.js Implementing Simple Crawler

Why did you choose to use node to write crawlers? Just because cheerio is a library that is fully compatible with jQuery grammar, it's really cool to use if you're familiar with it. Dependent Choice cheerio Node.js version of jQuery Http: Encapsulates an HTPP server and a simple HTTP client iconv-lite To solve the problem of scrambling gb2312 ...

Posted on Wed, 17 Jul 2019 12:52:13 -0700 by jackiw