js synchronous and asynchronous

@ ① Asynchronous API Synchronization API: synchronization tasks are executed on the main thread to form an execution stack. The next API can only be executed after the execution of the current API is completed console.log('before'); console.log('after'); /*Output results *, Asynchronous API: the execution of the current API will not block the ...

Posted by EWaveDev on Thu, 27 Jan 2022 20:09:11 +0100

vue change detection

1. What is a watcher The watcher is a mediator that notifies it when data changes, and then it notifies others. For the watcher, see an example of using it: //keypath vm.$watch('a,b,c', function(newVal, oldVal){ //do something } ) This code represents data a. When the B.C attribute changes, the function in the second parameter is trigg ...

Posted by luvburn on Thu, 27 Jan 2022 15:43:19 +0100

Leetcode problem solving series -- symmetric binary tree (recursion)

This topic aims to share some interesting or valuable topics found in the process of brushing Leecode. [answer based on js, of course].Recursive algorithm has always been one of the key types of leetcode medium difficulty exercises, so the key is self-evident.Topic relatedOriginal address: https://leetcode-cn.com/problems/dui-cheng-de-er-cha-sh ...

Posted by godwisam on Thu, 27 Jan 2022 15:12:33 +0100

golang learning notes sorting

Basic part of golang: Go cannot download and install git plug-in because the ip address of go agent cannot be accessed. You can change the following address: Proxy is used by default golang. Org, not accessible at home  go>go get -u github.com/go-sql-driver/mysql  go>go env -w GOPROXY=https://goproxy.cn goweb part: Four link ...

Posted by dgrinberg on Thu, 27 Jan 2022 12:33:50 +0100

element table manually implements user-defined filtering (Unofficial)

Look at the renderings first 1, Foreword Party A has to export well and use excel for advanced screening. It has to implement one in the web page.... The initial attempt to use the official screening of element is very different from that of excel after showing it to Party A.. Fortunately, the official provides a custom header, so you ...

Posted by jwcsk8r on Thu, 27 Jan 2022 12:31:21 +0100

[JavaScript] notes - JS overview; Three ways to embed JS code in HTML

1, JavaScript overview: 1. JavaScript is a scripting language that runs on browsers. JS for short.JavaScript was developed by Brandon Archie of NetScape (the father of JavaScript), originally called LiveScript.The emergence of LiveScript makes the browser more vivid and no longer a simple static page. Pages are more interactive.At some stage i ...

Posted by m2babaey on Thu, 27 Jan 2022 11:09:17 +0100

JS base array type

Declaration array Array is a collection of multiple variable values. Array is an instance of array object, so you can call methods like objects. Create array Creating arrays using object mode console.log(new Array(1, 'wgchen', 'willem')); // [1, 'wgchen', 'willem'] Using literal creation is a simple recommended practice const array = ...

Posted by KFC on Thu, 27 Jan 2022 06:32:52 +0100

Easy introduction to regular expressions

regular expression establish Creation method Method 1: use the constructor to create. The syntax is new regexp (regular expression, matching pattern). The specific of this method is flexible and can pass variables, but it is cumbersome to use const str = '1234 abcd' let reg reg = new RegExp(/\d/, 'g') console.log(str.match(reg)) // [ ...

Posted by mjr on Thu, 27 Jan 2022 04:58:46 +0100

ajax notes_ 01_ Native ajax

Chapter 1 native AJAX Introduction to AJAX The full name of AJAX is asynchronous JavaScript and XML, which is the JS and XML of asynchronous requests. Through AJAX, you can send asynchronous requests to the server in the browser. The biggest advantage is to obtain data without refresh AJAX is not a new programming language, but a new w ...

Posted by Liodel on Thu, 27 Jan 2022 04:39:11 +0100

JavaScript learning record

array Create array Create an array with new var arr1 = new Array();//An empty array was created Creating arrays with array literals var arr2 = [];//An empty array was created var arr3 = [1,'2','kalise',true]; Because the second is simple, the second is usually used Accessing array elements var arr3 ...

Posted by USMarineNCO on Thu, 27 Jan 2022 04:00:00 +0100