Comparison between Javascript and C# Linq iterators

outline In front-end and back-end code development, iterator pattern is widely used in the process of data traversal to simplify our traversal code. This paper mainly compares the iterators in JS and C # from two aspects of implementation and principle, so as to deepen our understanding of the programming mode of iterators. code implementatio ...

Added by anoopmail on Mon, 24 Jan 2022 20:44:59 +0200

Methods of manipulating arrays in Js

The latest front-end interview question in 2021 (operation method of array in Js) preface Tip: how to count arrays in JS This paper aims at the problems of operating array related methods in the process of front-end interview I don't know if there are any friends who often confuse the methods of operating arrays like me, or are not very ...

Added by jayjay960 on Sun, 23 Jan 2022 23:26:15 +0200

axios interceptor - basic usage and interceptor code

Before, when developing the background management system, I developed it with other colleagues. To be honest, I wrote pages on the basis of others' development... Now I want to pick up the points I didn't pay attention to before.. Today, let's look at the usage of axios interceptor When writing code with vue, axios can be used to make ajax r ...

Added by wescrock on Sun, 23 Jan 2022 09:28:47 +0200

JavaScript asynchronous programming and synchronous mode

JavaScript asynchronous programming The reason why javaScript adopts single thread: because javaScript is used to realize the dynamic interaction of pages, the core of interaction needs to operate dom. This situation determines that it must use single thread model, otherwise complex thread synchronization problems will occur; For example, i ...

Added by mfallon on Sun, 23 Jan 2022 02:35:44 +0200

react3.0 - component, component value transfer, Context, component life cycle, routing, matching mode

react3.0 The variable name of global import can be customized, and the specified variable name is used for on-demand import Review component value transfer: Father to son, son to father: review.js import React from "react" // When transferring values, pay attention to the problem of this pointing. There are three solutions: 1 Use bind in t ...

Added by edtlov on Sat, 22 Jan 2022 00:40:37 +0200

JavaScript Volume I you don't know - in-depth understanding

catalogue Part I: scope and closure Chapter 1. What is the scope Chapter 2} lexical scope Chapter 3 function scope and block scope Chapter 4 - lifting Chapter 5: scope closure The second part is} this and object model Chapter 1} about this Chapter 2} this comprehensive analysis Chapter 3: object Chapter 4} mixed object "class&qu ...

Added by scratchwax2003 on Tue, 18 Jan 2022 05:50:16 +0200

Ab initio front end --es6 (Promise)

Promise concept Promise is a solution for asynchronous programming, which is more reasonable and powerful than traditional solutions - callback functions and events. The Promise is simply a container that holds the results of an event (usually an asynchronous operation) that will not end in the future. characteristic The state of the objec ...

Added by allinurl on Mon, 17 Jan 2022 20:43:04 +0200

In order to get her started with canvas in 10 minutes, I stayed up late and wrote three small projects and this article

(https://juejin.cn/post/697868... "https://juejin.cn/post/6978685539985653767")」prefaceHello, I'm Lin Sanxin. When I recalled my school recruitment, I was asked about canvas many times by the interviewer, but I didn't. later, I always wanted to find a chance to learn canvas, but I didn't have time. The position of canvas in the front end is be ...

Added by BooRadLey on Mon, 17 Jan 2022 08:59:33 +0200

ES6 leak checking and defect filling [array expansion]

At the beginning of the new year, we will revisit the expansion of ES6 array. Array extension 1. First briefly review the array method in ES5 Change the of the original array: add to: push / unshift Delete: pop / shift Add or delete anywhere: splice(startIndex,delCount, ...addElement) Flip: reverse Sort: sort Do not change the ...

Added by ziggy3000 on Mon, 17 Jan 2022 04:10:23 +0200

Several writing methods of TypeScript definition function

Reference link 1Reference link 2 Writing 1 - use the function keyword function greeter(fn: (a: string) => void) { fn("Hello, World"); } function printToConsole(s: string) { console.log(s); } greeter(printToConsole); (a: string) => void The meaning of the above syntax: it means that a function receives a string as an input para ...

Added by houssam_ballout on Sun, 16 Jan 2022 13:26:53 +0200