JS foundation # day 5

catalogue 1, Constructor to create an object 2, Basic and reference data types 3, Literal creation object 1, Constructor to create an object 1. The function called with the new keyword is the constructor, which is a function specially used to create objects. // 1. When typeof is used to check an object, object will be returned va ...

Added by scottd on Thu, 30 Dec 2021 09:40:02 +0200

The first step in refactoring

If you want to add a feature to a program, but find that the code is not easy to change due to the lack of good structure, refactor the program to make it easier to add a feature, and then add the feature. The first example of refactoring //plays.json... { "hamlet": {"name": "Hamlet", "type": "tragedy"}, "as-like": {"name": "As You Like I ...

Added by Asperon on Thu, 30 Dec 2021 09:04:16 +0200

Overview of basic use of Vue CLI and Vue Router

preface    basic instructions for Vue's tools (Vue CLI) and core plug-in (Vue Router). Vue CLI Official installation: Portal First install the scaffold globally. npm install -g @vue/cli # OR yarn global add @vue/cli Detect the installed version: vue --version or vue -V Create a project: Vue create my project or vue ui is cre ...

Added by wpfn on Thu, 30 Dec 2021 05:07:02 +0200

Quark renderer -- Part 14

2021SC@SDUSC overview Last time we discussed lines in the geometric sense, we will discuss the files under the graphic package. There are several folders, such as drag, gradient, line, link, shape and transform, which represent different image operations. Next, we will mainly learn the js content in these packages. graphic package drag pack ...

Added by cr-ispinternet on Thu, 30 Dec 2021 02:27:03 +0200

Exploration of generating screenshot poster at mobile terminal H5

Demand scenario The mobile terminal H5 generates pictures and posters for sharing, which is a common interaction method. The generated posters often contain user's personalized information, such as avatar, nickname and so on. In order to realize this interaction, we explore a feasible implementation scheme. Scheme selection According to ...

Added by ScottCFR on Thu, 30 Dec 2021 02:08:01 +0200

Simple understanding of asynchrony in Javascript

What is asynchronous?Asynchrony is relative to synchronization. Synchronization is to execute code line by line. Asynchrony is to execute multiple tasks at the same time.for instance:Once in the journey to the west, the boy scolded the monk Tang's teachers and disciples as a bald thief who stole fruit. Sun Wu's face turned red, but he couldn't ...

Added by melkara on Thu, 30 Dec 2021 01:33:46 +0200

Five js ways to judge whether it is an integer type

Five js ways to judge whether it is an integer type This article looks at how to determine the Integer type. JavaScript does not distinguish between integers and floating-point numbers. All numbers are represented in 64 bit floating-point format, which is the same as the double type of Java. However, in practical operations, such as array index ...

Added by belick on Thu, 30 Dec 2021 00:17:04 +0200

You know Promise

1. resolve parameter of promise 1.1 common values or objects When the parameter of the resolve method is a normal value or object, the Promise state changes directly. new Promise((resolve, reject) => { // pending -> fulfilled // Resolve (basic data type or common object) resolve('promise'); // resolve({name: 'fct'}); }).then(re ...

Added by condorchou on Thu, 30 Dec 2021 00:08:47 +0200

[latest and complete] front end development specification series - JS

Why did you do itThere are many front-end development specifications in the target market, some are too old, some are too simple and one-sided. Aiming at these problems, tal Peiyou growth front-end team has sorted out the latest and complete front-end development specifications, including JS, CSS, HTML, lint, Vue, etc.The meaning of doing itImp ...

Added by hyster on Wed, 29 Dec 2021 23:41:23 +0200

The use of websocket in uni app the mechanism of disconnection, reconnection and heartbeat

preface Recently, webSocket has been used in the development of H5 and APP. Sometimes the network of web/app is unstable or the server is disconnected actively, which leads to the failure of message push, and the client needs to be reconnected. After consulting the data, we found a heartbeat mechanism, that is, the client sends a message to ...

Added by brentech on Wed, 29 Dec 2021 21:02:01 +0200