js inheritance method and call and apply methods

The method of the first page is inherited by the class of ES6 Create two constructors with class, which are divided into parent constructor, child constructor, and child constructor extensions, which inherit the parent constructor Instantiate the object that creates the sub constructor, pass in parameters, and call methods <script> ...

Posted by foid025 on Thu, 23 Dec 2021 18:20:58 +0100

vue project generates desktop application through Electron

The main method used in this paper is to package your own Vue project and put it into the official demo file of electron. After modifying the corresponding configuration, generate an exe file. 1, Installation 1. Download the official demo of electron git clone https://github.com/electron/electron-quick-start 2. Install cnpm It's not ...

Posted by astoller on Thu, 23 Dec 2021 14:22:21 +0100

javaScript this points to the problem

Portal 1, this Introduction: the reason why JavaScript language has this design is related to the data structure in memory. var obj = { foo: 5 }; The above code assigns an object to the variable obj. The JavaScript engine will first generate an object {foo: 5} in memory, and then assign the memory address of the object to the variable ...

Posted by kevinkhan on Thu, 23 Dec 2021 13:04:39 +0100

"Let's go Golang" let Xie Cheng kill himself

"Let's go Golang" let Xie Cheng kill himself In this blog post, we discuss Go's cooperation process and kill his own cooperation process. Here we need to use runtime Goexit(). Let's start with the runtime Goexit() and its usage package main import ( "fmt" "runtime" "time" ) func task051() { defer fmt.Println("Here you go") ...

Posted by jstone3503 on Thu, 23 Dec 2021 09:44:13 +0100

[reread the knowledge points related to the scope of js Plan you don't know] recheck [1]

1. Concept of scope 1.1 what is the scope? In the program, we will use traversal, and how do we store these variables, and then how do we find them when we need to change these variables? Therefore, there is a rule in the program to store variables, which is convenient for us to query later, and this set of rules is what we call scope. In ...

Posted by joejoejoe on Thu, 23 Dec 2021 08:00:17 +0100

javascript solution to the loss of precision in addition, subtraction, multiplication and division of toFixed decimals

Reason: js handles the addition, subtraction, multiplication and division of decimals according to binary system, and expands or inversely expands the precision of arg2 on the basis of arg1. Therefore, the following situations will occur The decimal point addition, subtraction, multiplication and division of javascript(js) is a js bug, such as ...

Posted by krraleigh on Thu, 23 Dec 2021 05:23:39 +0100

Vue basic operation learning record

Vue basic operation learning record #: id selector . : calss selector Basic steps for Vue introduction 1. Import the development version of Vue js 2. Create a Vue instance object and set the el attribute and data attribute 3. Use template syntax to render data to the page el: mount point vue instance scope: the element hit by the el optio ...

Posted by jwer78 on Thu, 23 Dec 2021 03:25:00 +0100

13 JavaScript one-line programs that make you look like an expert

Author: shade Translator: front end Xiaozhi Source: medium There are dreams and dry goods. Wechat search [Daqian world] pays attention to this bowl 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, materials and ...

Posted by phpretard on Thu, 23 Dec 2021 01:40:01 +0100

jq dynamic splicing of html pages and data

1, jq dynamic splicing html page Requirements: 1. The page content is not dead 2. Dynamically load page data according to background data realization: Before that, we need to understand the difference between apppend() and html(): Simply put, the append () method is to add an element to the element list, but html () is to replace the data in ...

Posted by Hellbringer2572 on Wed, 22 Dec 2021 22:25:35 +0100

es6 - use of variables, constants, deconstructions, objects, arrays

1, Variable es5 uses var to declare a variable. The characteristics of var are different from those of conventional programming languages. Therefore, es6 provides a method of declaring variables similar to that of conventional languages. let differs from var in that: 1. The variable declaration will not be promoted, that is, the variable can ...

Posted by shamuraq on Wed, 22 Dec 2021 18:35:12 +0100