ES6 Decorator, core decorators js,Mixin,Trait

ES6 (xxx) Decorator, core-decorators.js, Mixin, Trait [note] the Decorator proposal has been greatly revised and has not been finalized yet. I wonder if the grammar will change again. The following content is completely based on previous proposals and is a little outdated. After waiting for finalization, it needs to be completely rewritten ...

Posted by stemp on Sun, 26 Dec 2021 11:50:09 +0100

ES5 and ES6 NEW

catalogue 1. ES6 - define variables 2. ES6 - template string 3. ES6 - arrow function 4. ES6 - function parameter default value 5. ES6 - deconstruction assignment Interview case: 6. ES6 - extension operator 7. ES6 - object abbreviation syntax 8. ES6 - Modular Development 9. ES6 - class syntax 10. Legend: +ECMAScript is a version ...

Posted by daniel_lee_hill on Sat, 25 Dec 2021 06:10:00 +0100

"Vue source code learning" do you want to know the implementation principle of Vuex?

Hello, I'm Lin Sanxin. Vuex is a special for Vue JS application development state management mode. It uses centralized storage to manage the state of all components of the application, and uses corresponding rules to ensure that the state changes in a predictable way.Under what circumstances should I use Vuex?Vuex can help us manage shared stat ...

Posted by Skoalbasher on Sat, 25 Dec 2021 06:05:18 +0100

"Vue source code learning" do you really know how Slot slot is "inserted"

Hello, I'm Lin Sanxin. Vue has implemented a set of content distribution API s, using the < slot > element as an exit to host the distribution content. This is the description on the Vue document. Specifically, a slot is a 'space' that allows you to add content to a component. Do you really know how a slot is "inserted"? I hope ...

Posted by d-m on Thu, 23 Dec 2021 18:15:37 +0100

Function extension of ES6

1 default value of function parameter After ES6, you can specify default values for function parameters: As shown below, before ES6, we can specify default values for parameters in the following alternative ways: function log(x, y) { if (typeof y === 'undefined') {//Avoid using the specified default value when y is an empty string y = 'Worl ...

Posted by kbascombe on Mon, 20 Dec 2021 20:45:15 +0100

Modular output in ES6

In previous javascript, there was no concept of modularity. If you want to perform modular operations, you need to introduce third-party classes Library. With the development of technology and the separation of front-end and back-end, the front-end business becomes more and more complex. It was not until ES6 brought modularity javascript suppor ...

Posted by ralba1998 on Mon, 20 Dec 2021 09:40:26 +0100

Step by step analysis of handwritten promise

Promise is a constructor for asynchronous requests introduced by es6 to help solve the problem of callback hell. The following content will customize the implementation of promise, which only includes basic use, so some boundary conditions are not taken into account.If you are not familiar with promise usage, you can moveUnderstanding and use o ...

Posted by cyberdwarf on Mon, 20 Dec 2021 01:17:39 +0100

Compare two times in js

Demand: set a collection time for unpaid items. The user can customize the collection time. If the current time exceeds the collection time set by the user, an alert prompt will pop up when the operation and management personnel log in to the system This article focuses on!!! js for time difference, I have sorted out three implementation metho ...

Posted by stephenf33 on Sun, 19 Dec 2021 03:22:50 +0100

The difference between var, let and const

The difference between var, let and const General differences: const defined variables cannot be modified and must be initialized. Variables defined by var can be modified. If they are not initialized, undefined will be output and no error will be reported. Variables defined by var have no block concept and can be accessed across favorit ...

Posted by flatpooks on Wed, 15 Dec 2021 20:09:29 +0100

Knowledge system of Web front end development engineer_ 22_JavaScript core

1, Closure Both global variables and local variables have their own advantages, but they also have their own shortcomings. The advantage of global variables is that they can be reused, but they are easily polluted (note that all forms of global variables are prohibited in general companies). Although local variables will not be polluted, they ...

Posted by hush2 on Wed, 15 Dec 2021 17:42:40 +0100