JavaScript learning summary

preface Recently, I have been using JavaScript for front-end and back-end development (the back-end uses the Express framework), which is a very interesting programming language. Discovery during exploration MDN document (can choose Chinese) is a good learning material, so start reading and make a simple summary. At the end of the article, som ...

Posted by wwfc_barmy_army on Sun, 01 May 2022 09:06:59 +0300

In line style CSS

1, CSS can help users complete the following tasks in the page: Explicit and implicit effects: with the help of CSS display and visibility. Combined with fade in, fade out and various animation sequences, complex visual effects can be designed Size scaling: it is realized by width and height of CSS. It is common in deformation animation, su ...

Posted by jmarco on Sun, 01 May 2022 04:27:27 +0300

JavaScript web page exception capture

JavaScript web page exception capture 1, Approximate classification of anomalies Generally, the exceptions we want to catch are roughly classified as follows: 1. Syntax error During the development phase, it is handled through tools such as IDE prompt and eslint be careful: a. The onerror event code block is not together with the syntax error ...

Posted by narch31 on Sun, 01 May 2022 01:30:41 +0300

Boost ssr and use focus to add some materials to nextjs applications

Open source is not easy. Thank you for your support, ❤ star concent^_^ preface Nextjs is a very popular application framework for rendering on the server side of react. It is light-weight, easy to use and active in the community. Therefore, when we use react to write an application that requires ssr(server side render), nextjs will be the first ...

Posted by white99 on Sat, 30 Apr 2022 23:49:27 +0300

Inheritance of objects in javascript

1. Constructor inheritance function animal() { this.type = "animal" } function Cat(name, price) { animal.call(this, arguments)/*Change the direction of this*/ this.name = name; this.price = price; } var cat1 = new Cat('tom', '$8888') console.log('Output inherits from constructor animal Properties of type value', cat1.type) 2. Proto ...

Posted by p0pb0b on Sat, 30 Apr 2022 17:44:25 +0300

Difference between forEach() and map() in JS array

Translator: front end XiaozhiAuthor: Ashish LahotiSource: odingconcepts Like again, wechat search [Daqian world] focuses on this person who has no big factory background but has an upward positive attitude. This article GitHub https://github.com/qq44924588... It has been included in the, the articles have been classified, and a lot of my docume ...

Posted by mchip on Sat, 30 Apr 2022 14:35:30 +0300

How to write a JSON parser?

preface While working some time ago, I encountered the following problems. The JSON passed to me by the back end, in which the id field uses the format of number, but the size of id exceeds the range of 2 ^ 53 - 1 ~ 2 ^ 53 - 1. Cause JSON Number overflow during parse. The back end is unwilling to modify the interface. Finally used json-bigint T ...

Posted by new_to_php2004 on Sat, 30 Apr 2022 10:33:04 +0300

Handwriting a babel plug-in

Above How does babel work The AST in bable is introduced in. This time, let's write a plug-in for bable, which will cover most of the usage. If you don't understand some details, you can go to the official Babel manual. The Chinese version is here:https://github.com/jamiebuild...However, some parts have not been translated yet.Access nodeFirst, ...

Posted by linux1880 on Sat, 30 Apr 2022 01:53:55 +0300

Object Oriented Programming

Object oriented programming idea 1, Face process: pay attention to the steps of solving the problem, analyze each step required by the problem, and call the functions in turn; 2, Face object: it is a programming idea. Encapsulating data and programs for processing data into objects; 3, Features of facial objects: abstraction, inheritance, en ...

Posted by ChrisFlynn on Sat, 30 Apr 2022 01:40:31 +0300

Implementation of authentication based on jwt

cause http is a stateless protocol. You need to know which user it is, so you need an authentication mechanism. With the development of technology and the popularity of distributed web applications, the cost of managing user login status through session is becoming higher and higher. Therefore, it has gradually developed into a token method to ...

Posted by dougmcc1 on Fri, 29 Apr 2022 23:18:53 +0300