Do you use these API s commonly used in advanced front ends?

This article is included in github https://github.com/Michael-lz...MutationObserverMutationObserver is an interface that can listen for DOM structure changes. The MutationObserver is notified of any changes to the DOM object tree.APIMutationObserver is a constructor that accepts a callback parameter and is used to handle node changes. It return ...

Posted by gj6kings on Wed, 10 Nov 2021 17:39:09 -0800

Judge whether it is a balanced binary tree - js

01 - sum of two numbers - js describe Given an integer array numbers and a target value target, please find two subscripts in the array that add up to the target value, and the returned subscripts are arranged in ascending order. Example 1 Input:[3,2,4],6 Return value:[2,3] Note: because 2+4=6 ,And the subscript of 2 is 2, and the subscrip ...

Posted by sherri on Wed, 10 Nov 2021 08:05:06 -0800

React from 0 with react item 1

Knowledge points: webpack with react environmentRealize adaptationConfigure dynamic routing webpack with react environment Installation dependency npm init -ycnpm install react react-dom @types/react @types/react-dom react-router-dom @types/react-router-dom antd redux react-redux @types/react-redux react-thunk redux-logger @types/redux-logg ...

Posted by RonHam on Wed, 10 Nov 2021 06:15:35 -0800

My study notes 11.10

2021SC@SDUSC Coordinate axis to configure xAxis: the x axis in the rectangular coordinate system grid. xAxis.show  : Whether the x-axis is displayed. The default is true. xAxis.gridIndex  : The index of the grid where the x-axis is located. It is located on the first grid by default. The default value is 0. xAxis.position: th ...

Posted by fowlerlfc on Wed, 10 Nov 2021 05:40:41 -0800

Javascript type judgment

Basic types of JS There are seven basic types of JS: bigInt (bigInt is a built-in object and the second built-in type other than symbol), number, string, boolean, symbol, undefined and null. Complex data types include objects, including basic objects, functions, arrays, and built-in objects (Date, etc.). Method of judging type Method 1. type ...

Posted by TLawrence on Wed, 10 Nov 2021 05:23:22 -0800

Function nesting and closure in js

Today, let's talk about closures I understand. Before we talk about this, let's first understand the definition domain of variables.In js, the variable definition domain includes global scope and local scope. The new variable declaration keyword in es6 is introduced to solve the confusion of the scope of some variables. The global scope is not ...

Posted by totof06 on Wed, 10 Nov 2021 04:17:19 -0800

20 JavaScript single line code killer maces

Gets the value of the browser Cookie Retrieve the value of the cookie by using document.cookie access. const cookie = name => `; ${document.cookie}`.split(`; ${name}=`).pop().split(';').shift(); cookie('_ga'); // Result: "GA1.2.1929736587.1601974046" Convert RGB to hexadecimal const rgbToHex = (r, g, b) =>   "#" + ((1 << 24 ...

Posted by RP on Wed, 10 Nov 2021 03:18:40 -0800

setup function in Vue3 and response expression ref reactive

In the previous article, Xiaobian and everyone learned the basic syntax and concepts of Vue, including components, data mixing and slots. Starting today, Xiaobian will learn the new features in Vue3, that is, the overwhelming composition API fried online, to see what the magic is. The code we wrote through Vue is basically like this Vue.create ...

Posted by lee2732 on Tue, 09 Nov 2021 22:48:14 -0800

3D shuttle effect? Easy to handle with CSS

backgroundI habitually log in to Apex at home at the weekend and prepare to play some games. In the process of landing the accelerator, it was found that the accelerator expired.I have been using Tencent online game accelerator, but click the recharge button to prompt that the client has been upgraded recently and does not support recharge (thi ...

Posted by doni49 on Tue, 09 Nov 2021 21:56:50 -0800

Introduction to JavaScript arrays

Array introduction Array -An array is also an object -It is similar to our ordinary object function and is also used to store some values -The difference is that ordinary objects use strings as attribute values, while arrays use numbers as index operation elements. -Index: Integer starting from 0 -Th ...

Posted by Weiry on Tue, 09 Nov 2021 20:54:43 -0800