Explain the difference between var / conlet and JavaScript variable declaration
Let and const are newly added commands in ES6 to declare variables. These two commands are different from var in ES5, and let and const are slightly different
The difference between var and let/const
Block level scopeThere is no variable promotionTemporary dead zoneNon repeatable declarationThe global variables declared by let and const ...
Posted by ridgedale on Wed, 02 Feb 2022 02:56:40 +0100
Dark horse JavaScript notes ECMAScript
first day
01 first acquaintance with JavaScript
1. Brief JavaScript
1.5
DOM (document object model): standard programming interface BOM (browser object model) Build a my JS, write alert('didi ') in the file; single quotes
2. JS notes
Single line comment: ctrl+/ Multiline comment: ctrl+shift+/
3. JS input / output statement
Aler ...
Posted by GinsBabu on Wed, 02 Feb 2022 02:53:26 +0100
JavaScript object oriented
JavaScript object oriented
1-1 introduction to object-oriented programming
1-1.1 two programming ideas:
Process orientedobject-oriented
1-2 POP (process oriented programming)
Process oriented is to analyze the steps needed to solve the problem, and then use functions to realize these steps step by step. When using, just call them o ...
Posted by rkeppert on Wed, 02 Feb 2022 01:36:23 +0100
About official account H5 compression method
preface
Development of official account H5 uploading pictures and compressing method based on uni-app
thinking
Upload pictures
We should be clear that there are three ways to display pictures: file (file stream), bolb (local stream) and Base64 (binary stream)
file
The File interface provides information about the File and allows JavaS ...
Posted by marknt on Tue, 01 Feb 2022 23:29:20 +0100
React high level guidance: Context context & component combination & Render Props
React high level guidance: Context context & component combination & render props
preface
Today is also to explain the advanced application skills of React. The content may involve the use of some special API s, or the special usage of React components and props. It can be regarded as a design pattern, an exclusive design pattern ...
Posted by stennchau on Tue, 01 Feb 2022 22:24:31 +0100
Thinking about the sequential relationship among HTML native document loading event + React\Vue life cycle + browser rendering
The cause of the incident is as follows:
I have a need to add a dark mode for my blog. I need to save the user's choices in loadstorage, but to publish the content to github Pages, I need to compile it in the node environment. There will be objects such as window and localstorage that cannot be found. If I want to solve this problem, I need to ...
Posted by philipreed on Tue, 01 Feb 2022 22:15:20 +0100
Use a more readable way to set TypeScript types
Author: SARANSH KATARIA Translator: front end Xiaozhi Source: wisdomgeek
There are dreams and dry goods. Wechat search [Daqian world] pays attention to this dish washing wisdom who is still washing dishes in the early morning.
This article GitHub https://github.com/qq449245884/xiaozhi It has been included. There are complete test sites, ...
Posted by zarp on Tue, 01 Feb 2022 21:17:54 +0100
Summary of several introduction methods and selectors of CSS
1, Cascading style sheets
Introduction
Cascading style sheets are used to represent HTML(Standard universal markup language An application of) or XML (a subset of the standard common markup language) and other file style computer languages. CSS can not only modify the web page statically, but also format the elements of the web page dynamical ...
Posted by ikebaldo on Tue, 01 Feb 2022 20:55:21 +0100
Freecodecamp JavaScript elementary algorithm question-2
Then continue to write the last article.5. Find the largest number in multiple arraysInput: largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]])Output: [27, 5, 39, 1001]Solution:function largestOfFour(arr) {
let temp = [];
for(let i =0;i<arr.length;i++) {
temp.push(Math.max(...arr[i]));
}
return ...
Posted by syed on Tue, 01 Feb 2022 17:21:37 +0100
XSS Network Security Learning and Practice
XSS
Cross site scripting (XSS) is a kind of security vulnerability attack of website application and a kind of code injection. It allows malicious users to inject code into the web page, which will affect other users when they watch the web page. Such attacks usually involve HTML and client scripting language
Attack mode
Attack the website b ...
Posted by JCBarry on Tue, 01 Feb 2022 17:13:52 +0100