Intl.NumberFormat is used for numerical calculation
Intl.NumberFormat is an international digital processing scheme. It can be used to show the preference of different countries for digital processing. However, in general, we still process more Chinese numbers, but I find this Intl.NumberFormat is also very useful. Digital grouping
new Intl.NumberFormat('zh-CN',{useGrouping:true}).format(123456 ...
Posted by advoor on Tue, 19 Oct 2021 10:47:18 -0700
Anti shake and throttling
In the actual development, we will encounter such a scenario: we need to register an event, but sometimes this event will be triggered frequently in a short time. The frequent execution of the event will lead to a large number of calculations by the browser and cause the page to jam and fake death. Therefore, we need to solve this problem t ...
Posted by JAB Creations on Mon, 18 Oct 2021 17:39:40 -0700
Transform index list with virtual list
introduction
In a team that advocates "rapid development", the delivery date is often the first standard to measure the work. The way to solve problems will also be partial to violence. The way of violence often disgusts and loses voice. Especially when the interviewer asks about the difficulties in the development process, he can't ...
Posted by n8r0x on Mon, 18 Oct 2021 13:38:04 -0700
Conversion between data structure Map and other data types in ES6
preface
Hello, guys. In the previous article, we shared the Map data structure in ES6 in detail. This article will make a supplement to Map on the basis of the previous article. There is another knowledge about Map that has not been shared, that is, the mutual conversion between Map and other types.
Through the study of the previous artic ...
Posted by Mohit_Prog on Mon, 18 Oct 2021 12:08:46 -0700
Painstakingly collect the most complete JavaScript and the most practical tool function methods in the history, and it is recommended to collect them!
1. Digital operation
(1) Generates a random number in the specified range
export const randomNum = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
(2) Digit thousands separator
export const format = (n) => {
let num = n.toString();
let len = num.length;
if (len <= 3) {
return num;
} else { ...
Posted by Kain Elderan on Mon, 18 Oct 2021 00:15:14 -0700
Styled components of CSS in JS
The code is already associated with github: Link address I think it's good. You can click star. Here you will continue to share your development experience (:
As we all know, JSX is an extension of JS syntax and adds support for HTML syntax. It is only one CSS syntax support away from all in js. At present, 60 + libraries are well-known to ...
Posted by scotte on Sun, 17 Oct 2021 22:35:06 -0700
What is TypeScript generic programming
Front end programmers may not know generics very well. They may know generics if they know Java, a strongly typed language. They can use generics to write dynamically reusable TS code. In TS, generics are generally used for classes, interfaces and functions.
Today, let's learn how to use generics in TypeScript and the scenarios where generics ...
Posted by iamyespee on Sat, 16 Oct 2021 11:11:37 -0700
Use the plug-ins aplayer and MeingJS to add music in the hexo article
music
Dependency:
APlayer.js > 1.8.0Meting.js > 1.1.1
The usage of hexo tag aplayer and MeingJS is excerpted from the official website: Chinese documents
Start your own personal blog - > https://kartjim.top/2021/10/16/music
hexo-tag-aplayer
JavaScript based player plug-in
github - DIYgod/APlayer
Using the aplayer plug ...
Posted by bgomillion on Sat, 16 Oct 2021 00:48:43 -0700
Painstaking efforts to sort out the complete collection of JavaScript knowledge points, super detailed suggestions collection!!!
1, Syntax and variables
(1) . front end third floor
(2) Writing position of JS
(3) . output statement
(4) . variable declaration promotion
Variable declaration promotion: you can use a variable declared later in advance without throwing an exception
Before executing all code, JS has a pre parsing stage, which will pre re ...
Posted by alimadzi on Sat, 16 Oct 2021 00:30:06 -0700
Detailed explanation of javascript native js rotation diagram
catalogue
1. Realization of rotation chart function
4.1 getting elements
1.2 left and right buttons display and hide
1.3 small circle dynamic setting click add class name click picture move
1.4 cloning small li cells
1.5 click the button on the right to scroll the picture
1.6 click the button on the right to change the small circle poi ...
Posted by KC8Alen on Sat, 16 Oct 2021 00:13:49 -0700