js array summary
1, js array summary
1. Create (from/of)
1.Array() constructor
There are several basic ways to create arrays. One is to use the Array constructor, such as:
There are several basic ways to create arrays. One is to use Array Constructor, for example:
let colors = new Array();
If you know the number of elements in the array, you can pass a va ...
Posted by zedd2006 on Wed, 26 Jan 2022 03:09:33 +0100
Angular dependency injection principle
Dependency injection is a major feature of Angular, through which you can write more maintainable code. But the JavaScript language itself does not provide the function of dependency injection, so how does Angular implement the function of dependency injection? Read this article and you will find the answer.A typical Angular application, from t ...
Posted by djloc286 on Tue, 25 Jan 2022 21:41:01 +0100
Teach you to design a Neumorphism style digital clock with JavaScript (detailed code)
A clock is a device that we use to measure time. If used properly, the clock is a useful element for any UI. The clock can be used for websites with time as the main focus, such as some booking websites or some applications that display the arrival time of trains, buses, flights, etc. There are basically two types of clocks, analog and digita ...
Posted by WhiteHawk on Tue, 25 Jan 2022 15:43:53 +0100
Common cross domain solutions at the front end
catalogue
preface
Cross domain
Cross domain solutions
I Modify local HOST:
II JSONP
III CORS
Quad proxy
preface
Send request XMLHttpRequest(ajax, $ajax, axois),fetch
http://192.168.0.103:8080/
file:///F://vue Stage / Vue Engineering/_ systerm/public/index. The HTML: File protocol does not allow sending ajax requests
In normal pro ...
Posted by HeinekenBeer on Tue, 25 Jan 2022 15:42:37 +0100
Detailed explanation of the use of Redux + React Redux + Redux thunk in the actual project development of React
React is our view framework, but it is difficult to manage the data state that needs to be shared during large-scale project development. Components with obvious parent-child relationship are also more convenient to transfer values, but it is very troublesome for unrelated components to transfer values. At this time, we need to use our state ma ...
Posted by mamuni on Tue, 25 Jan 2022 14:59:43 +0100
Performance optimization and practice of front-end picture rendering - lazy loading of pictures
preface
For the home page APP with a large number of pictures, you need to add a large number of pictures when opening the commodity display page. In this scenario, if you directly load the full amount, it will inevitably lead to excessive page performance consumption, white screen or Caton, and the user experience is very bad. Do users really ...
Posted by yousaf931 on Tue, 25 Jan 2022 12:43:30 +0100
JavaScript - String of data type
A data type is a literal type
There are eight basic data types in JavaScript (the first seven are basic data types, also known as primitive types, while object is a complex data type).
Number is used for any type of number: integer or floating-point number, an integer in the range of ± (253-1).bigint is used for integers of any length. ...
Posted by bobocheez on Tue, 25 Jan 2022 11:54:38 +0100
Front-end-dynamic web Technology
ES6
let keyword
<script>
// es6 defines variables
// js definition: var has no scope, the same variable can be declared multiple times
// es6: let scope code is fast, the same variable can only be declared once
{
var a = 1
let b = 2
}
console.log(a) // 1
console.log(b) // Uncaught ReferenceError: ...
Posted by easyedy on Tue, 25 Jan 2022 08:30:32 +0100
Communication between Vue components -- collation
Vue inter component communication
Several scene previews
Data transfer between parent and child componentsData transfer between sibling componentsData transfer between ancestor components and subcomponents
- props / $emit
- $parent / $children and ref
- $emit / $on
- vuex
- $attrs / $listeners
- provide / inject
Several component communica ...
Posted by Lil Smurth on Tue, 25 Jan 2022 08:18:20 +0100
VUE learning notes 3
1. VUE CLI related
1.1 vuecli- introduction and installation of scaffold
Vue cli is an officially released Vue JS project scaffold Vue cli can be used to quickly build Vue development environment and corresponding webpack configuration Vue CLI prerequisites - Node and Webpack
Install node JS: you can download and install it on the ...
Posted by RobbertvanOs on Tue, 25 Jan 2022 03:32:09 +0100