JavaScript basic notes

JavaScript operator Operators commonly used in JS: Arithmetic operator Increment and decrement operatorsComparison operatorLogical operatorAssignment Operators Arithmetic operator operatordescribeexample+plus10 + 20 = 30-reduce10 - 20 = -10*ride10 * 20 = 200/except10 / 20 = 0.5%Remainder (modulus)Returns the remainder of division 9% 2 = 1 ...

Added by PHPBewildered on Tue, 01 Feb 2022 10:00:37 +0200

An inside volume note about TypeScript

Author: Attention 🐴 Github: Github Nuggets: Go in and have a look 🐴 Hobbies: Americano More Ice! An inside volume note about Typescript Typescript brief introductioninstallWrite the first demoBasics Raw data type Boolean valuenumerical valuecharacter stringNull value Arbitrary valuetype inference Union typeObject type - In ...

Added by planethax on Tue, 01 Feb 2022 09:39:52 +0200

[red book] Chapter 8: understanding objects, classes and object-oriented programming

ECMA-262 defines an object as an unordered set of attributes. We can imagine the object in JS as a hash table, in which the content is a set of key value pairs, and the type of value can be data or function. 1, Understanding object The usual way to create a custom Object is to create a new instance of the Object, and then add properties and m ...

Added by NJordan72 on Tue, 01 Feb 2022 07:50:56 +0200

Vue--Router -- hook function (navigation guard) -- usage scenario / instance

Original website: brief introduction explain This article introduces the usage scenario of the hook function (navigation guard) of Vue Router. Navigation guard usage of Vue Router, Official website It is described in great detail in. Only the usage scenarios are introduced here. Official website Navigation guard | Vue Router Hook functio ...

Added by adamgram on Tue, 01 Feb 2022 07:35:28 +0200

vue the vue cycle function triggered by the timer cannot be cleared by clearTimeout. The event code is executed in sequence

Recently, I worked on a mobile project and encountered a demand: if there is no operation on the home page for 20 seconds, I will automatically exit and log in. Other pages have no operation for 20 seconds and automatically jump to the home page. The so-called no operation includes user behaviors such as click, touch and slide. This requir ...

Added by R4nk3d on Tue, 01 Feb 2022 07:08:10 +0200

JavaScript object-oriented programming BOM object

Tip: the following is the main content of this article. The following cases can be used for reference 1, BOM 1. What is BOM? BOM (Browser Object Model) refers to the Browser Object Model, which can access and operate the browser window. Using BOM, developers can move windows, change the text in the status bar, and perform other actions ...

Added by valshooter on Tue, 01 Feb 2022 04:11:48 +0200

JavaScript Design Pattern proxy pattern

proxy pattern Let's review the questions left by the strategic model in the previous chapter: Assuming that the company's performance grade is divided into A, B, C, D and E, the corresponding grade points of the year-end bonus are 2, 1.8, 1.5, 1.1 and 0.8. Assuming that the year-end base is base, the year-end bonus is: year-end base * grade ...

Added by HockeyDevil07 on Tue, 01 Feb 2022 03:43:33 +0200

Implementation of JavaScript linked list

Linked list Linked list concept Linked list: a storage structure of data. A linked list contains several nodes. Each node contains at least one data field and one pointer field, and the pointer field points to the next node. Node: the storage image of the data element, which is composed of the data field storing the data element and the p ...

Added by dsds1121 on Mon, 31 Jan 2022 20:58:47 +0200

Here comes little Moore! Take you to be a magical little Moore in 3 minutes!

On June 1, the mobile tour of Moore Manor was officially opened. The little blogger went to download it for the first time. It's so fun that with this blog, let's see how to realize this lovely (magical) little Moore!! Realization effect Hahaha, is this little Moore's head very magical? The blogger tried his best! Isn't it cute~~ Implement ...

Added by Firestorm3d on Mon, 31 Jan 2022 20:51:33 +0200

Dark horse JavaScript notes, web APIs DOM, advanced events

1, DOM 01DOM introduction 1.1 what is DOM 1.2 DOM tree 02 get element 2.1 how to get page elements 2.2 get by ID <body> <div id="time">2019-9-9</div> <script> // 1. Because our document page is loaded from top to bottom, there must be a label first, so we write the script below the label ...

Added by Destramic on Mon, 31 Jan 2022 20:38:36 +0200