React series -- the realization idea of react basic syntax

prefaceLet's not talk about the syntax principle, but first forcibly simulate the syntax according to the API effect to realize a simple version of ReactThe following code has nothing to do with the React source code, just a simple simulation idearenderThe first step is to create an element return with the class and bind the click event. The co ...

Added by PHPFreaksMaster on Mon, 27 Dec 2021 15:42:39 +0200

Program problem of wechat applet

1 questionnaire stem [10 points] in the applet project, the data given in index.js is used to supplement the code in index.wxml and render the effect shown in the figure below. Note: fill in the blank number in the standard definition, and write the code filled in by yourself into the answer box according to the numbering sequence. index. T ...

Added by raytri on Mon, 27 Dec 2021 14:24:42 +0200

JavaScript advanced part-02 (prototype chain / ES6 class and inheritance)

1. Introduction to three characteristics of object-oriented ​ 1. Encapsulation: encapsulate a specific function in an object and only expose the specified interface to the outside. When the outside world uses it, it only considers how to use the interface, not how to implement it internally (the api learned earlier is actually an encapsulat ...

Added by larus@spuni.is on Mon, 27 Dec 2021 11:02:49 +0200

Sorting of top ten sorting algorithms (including JavaScript version and Python version source code)

Sorting algorithm Reference website: Ten classical sorting algorithmsTen classic sorting algorithms · Python code display Algorithm classification Related concepts Comparison sort: the relative order between elements is determined by comparison. Because its time complexity cannot exceed O(nlogn), it is also called nonlinear ...

Added by angelssin on Mon, 27 Dec 2021 09:06:10 +0200

ES6 ES6 Latest Proposal, do, throw, partial function execution, pipeline operator |>, Curitization,:, Realm API

ES6 (29) ES6 latest proposal, do, throw, partial function execution, pipeline operator |>, Curitization,:, Realm API 1. do expression Essentially, a block-level scope is a statement that encapsulates multiple operations together with no return value. { let t = f(); t = t * t + 1; } In the code above, the block-level scope encaps ...

Added by php new bie on Mon, 27 Dec 2021 08:19:49 +0200

JavaScript advanced part-03 (this point / context execution mode / recursion / closure)

1.this point Function has three execution modes: global function, object method and constructorthis: I point to whoever calls me (independent of the function declaration, depending on the function call) Global function: function name () -------------- > this points to windowObject method: object name Method name () ---- -- > this poi ...

Added by wombatee on Mon, 27 Dec 2021 08:08:34 +0200

Common design patterns of front end

Design principles Solid (stable) Single Responsibility Principle A class should have only one reason to change. In short, each class only needs to be responsible for its own part, and the complexity of the class will be reduced. Open Closed Principle A software entity, such as classes, modules, and functions, should be open to extensions ...

Added by jamcoupe on Sun, 26 Dec 2021 22:33:09 +0200

The foreground uses RSA asymmetric security to encrypt user information

First, briefly clarify the difference between symmetric encryption and asymmetric encryption: Symmetric encryption: that is, the same key is used for encryption and decryption; Asymmetric encryption: two keys are generated. The public key is used for encryption and the private key is used for decryption; Note: the encryption operation in this ...

Added by dswain on Sun, 26 Dec 2021 21:09:32 +0200

ES6 deconstruction assignment

1. Deconstruction assignment of array let [a = 'a', b = 'b'] = ['undefined',undefined]; //[undefined, 'b']; let [x = 1] = null // Null because null === undefined false; ES6 uses the strict equality operator (= = =) internally to judge whether a position has a value. The default value takes effect only if the array members are strictly equa ...

Added by jumpfroggy on Sun, 26 Dec 2021 20:31:02 +0200

JS basics day12

Addition, deletion and modification of DOM: Add innerHTML + = appendChild() insertBefore() Delete} innerHTML = 'remove() removeChild() Modify replaceChild() Query: Know node - line breaks, text, comments, labels are all node lists Tag: HTMLCollection Array array Array 2} Arguments Array 3 # NodeList Array 4} HTMLCollection Each of ...

Added by mainewoods on Sun, 26 Dec 2021 15:55:30 +0200