Ten sorting javascript implementation + animation demonstration

Algorithm classification Comparison sort: the relative order between elements is determined by comparison. Because its time complexity cannot exceed O(nlogn), it is also called nonlinear time comparison sort.Non comparison sort: it does not determine the relative order between elements through comparison. It can break through the time lowe ...

Posted by bandit on Wed, 05 Jan 2022 01:38:06 +0100

Xiaomi official website project production -- under javascript knowledge sharing

catalogue preface 1, Observe page content 2, Switching interface 3, Login form interface 1. Selected effect 2. Error prompt 3. Unchecked effect 4. Password box 4, Registration interface 5, Link jump summary preface Before, I shared the production of javascript content on the homepage of Xiaomi's official website. I don't kno ...

Posted by dv90 on Mon, 03 Jan 2022 22:49:39 +0100

The most complete handwritten JS interview questions

1 compose Title Description: implement a compose function // The usage is as follows: function fn1(x) { return x + 1; } function fn2(x) { return x + 2; } function fn3(x) { return x + 3; } function fn4(x) { return x + 4; } const a = compose(fn1, fn2, fn3, fn4); console.log(a(1)); // 1+4+3+2+1=11 Copy code The implementation code is a ...

Posted by affc on Mon, 03 Jan 2022 10:08:52 +0100

JavaScript tutorial quick start

JavaScript quick start Basic grammar grammar The syntax of JavaScript is similar to that of the Java language. Each statement is written in; End the statement block with {...}. However, JavaScript does not force you to add;, at the end of each statement;, The engine responsible for executing JavaScript code in the browser will automatically ...

Posted by cmattoon on Sun, 02 Jan 2022 22:47:03 +0100

ES6 you understand, but can you really use it? (here are 10 points to test whether you have been recruited)

preface The following is a summary of some ES6 knowledge points commonly used in my development, which does not represent all. It should be noted that the js syntax after ES5 is collectively referred to as ES6 (naming ES7, es8, etc. is nonstandard). 1. Deconstruction assignment In a program, we often take value operations, such as taking val ...

Posted by Matth_S on Sun, 02 Jan 2022 17:27:53 +0100

Why is there always an error in the countdown you write

In daily requirements, we often need to write the countdown function. But sometimes we find that the speed is different. What's going on?Let's think about it with questions. Should we use setInterval or setTimeout to write the countdown function?Suppose we use setInterval, we might write thislet interval = 1000 let countdown = () => { / ...

Posted by beesgirl713 on Sun, 02 Jan 2022 12:57:41 +0100

Vue basic learning

1, v-once The instruction does not need to be followed by any expression This instruction indicates that elements and components are rendered only once and will not change with the change of data Example: <div id="app"> <h2 v-once>{{message}}</h2> </div> <script src="../js/vue.js"></script> <script&g ...

Posted by phpHappy on Sun, 02 Jan 2022 05:53:10 +0100

[JavaScript in front-end tutorials] 10_DOM programming details table operations and events

JavaScript from getting started to mastering video through train:         [1-200] JavaScript video tutorial, from introduction to mastery, with more cases of practice, easy to understand!         [201-300] JavaScript video tutorial, from introduction to mastery, with more cases of practice, easy to understand! 1, JavaScript operation table ...

Posted by jamz310 on Mon, 27 Dec 2021 21:34:02 +0100

Slots for vue2 and vue3

Preface: the use of slots is actually very simple. You only need to understand two points: 1. Slots are used in sub assemblies. 2. Slots are used to display the template data of child components in the parent component normally vue2. Slot for 0 Without much to say, let's go directly to the case: <div id="app"> <div class="fa ...

Posted by billynastie on Mon, 27 Dec 2021 04:15:18 +0100

An interpretation of exports and module Exports and export, export default

For front-end beginners, exports and module Exports, export and export default are easy to misunderstand. The author writes an article to interpret them. Part I: exports and module exports To make node JS files can call each other, node JS provides a simple module system. The module is node The basic components of JS application, files and ...

Posted by maneetpuri on Sun, 26 Dec 2021 20:00:31 +0100