Koa study notes 1

Koa – register login interface implementation notes 1, Construction project Write a basic app. Note: use must receive a function as middleware //Import koa module const Koa=require('koa'); //Create koa instance const app=new Koa(); //Writing Middleware app.use((ctx,next)=>{ ctx.body+='hello koa' }) //Listening port app.listen(300 ...

Posted by stephenk on Mon, 21 Feb 2022 07:25:54 +0100

15 lines of code use mathematical formula in wangEditor v5

preface The official version of wangEditor v5 will be released soon. In order to verify its extensibility, I have developed several common third-party plug-ins. This article introduces the design and use of formula plug-in. To insert a mathematical formula, you need to use LateX syntax, and the rendering formula needs to rely o ...

Posted by nitroxman on Mon, 21 Feb 2022 05:08:33 +0100

javaScript asynchronous programming

summary Difference between synchronous and asynchronousEvent loop and message queue, that is, how to implement asynchronous modeAsynchronous programming modePromise asynchronous scheme, macro task / micro taskGenerator asynchronous scheme, async / wait syntax Synchronous mode Execute line by lineblock Asynchronous mode Do not wait for the ...

Posted by r3dk1t on Mon, 21 Feb 2022 05:06:51 +0100

Shang Silicon Valley super brother ----- Vue notes

note Scaffold file structure ├── node_modules ├── public │ ├── favicon.ico: Tab Icon │ └── index.html: Main page ├── src │ ├── assets: Storing static resources │ │ └── logo.png │ │── component: Store components │ │ └── HelloWorld.vue │ │── App.vue: Summarize all components │ │── main.js: Entry file ├── .gitignore: git Con ...

Posted by Lee W on Mon, 21 Feb 2022 04:18:55 +0100

Tiktok is convenient, small air conditioning special effect html+css+js

If you are Xiaobai, this set of information can help you become a big bull. If you have rich development experience, this set of information can help you break through the bottleneck 2022web full set of video tutorial front-end architecture H5 vue node applet Video + data + code + interview questions. Look at the effect first (the source cod ...

Posted by mtombs on Sun, 20 Feb 2022 21:48:47 +0100

JS - built in object String

String: a global object is a constructor for a string or a sequence of characters. The following lists several properties and methods commonly used by String objects. Properties: The length property indicates the length of a string. let string="hello" document.write(string.length)//Return to 5 method: The charAt() method returns the spec ...

Posted by ccx004 on Sun, 20 Feb 2022 19:07:19 +0100

Browser Principle 19 # how does the JavaScript engine implement async / await to write asynchronous code synchronously?

explain Learning notes of browser working principle and practice column Why async / await Let's start with a request for remote resources using fetch: Ruan Yifeng's Weblog: Fetch API tutorialMDN: Fetch API fetch request example fetch('https://www.geekbang.org') .then((response) => { console.log(response) return fetch('http ...

Posted by AnAmericanGunner on Sun, 20 Feb 2022 17:37:55 +0100

JS super detailed introduction summary

(1) Conversion of data types 1, Introduction to data type conversion In the program, there are often inconsistent data types, and data type conversion is required if the expected results are not obtained 1. Transfer from other types to number 1.1 string type to number console.log(Number('123')); //Convert string 123 to 123 1.2 integer: par ...

Posted by jpmoriarty on Sun, 20 Feb 2022 16:51:48 +0100

Sorting and summarizing the most commonly used array operations in 12 kinds of JavaScript

7. Convert to array Sometimes we have to convert some other data structures, such as sets or strings, into arrays. Class array: function parameters, dom collection Array.prototype.slice.call(arguments);Array.prototype.concat.apply([], arguments); character string: console.log('string'.split('')); // ["s", "t", "r", "i", "n", "g"]console.lo ...

Posted by brainardp on Sun, 20 Feb 2022 16:12:15 +0100

Latest ES6 proposal

1, do expression In essence, a block level scope is a statement that encapsulates multiple operations without a return value. { let t = f(); t = t * t + 1; } In the above code, the block level scope encapsulates the two statements together. However, there is no way to get the value of T outside the block level scope, because the block l ...

Posted by Savahn on Sun, 20 Feb 2022 14:41:33 +0100