Dylan

Dylan

Abstract class in Django model (abstract)

First, let’s introduce what attributes the django model has: Let’s look at an example first: The Meta of the Django model class is an internal class, which is used to define the behavior characteristics of some Django model classes. The following…

js judges empty objects and empty arrays

It is often necessary to judge data during business processing. Here we introduce the judgment methods of empty objects and empty arrays. Judgment of empty array Null object judgment The isPrototypeOf() method is used to test whether an object exists…

The new Set de-reuse method in js

ES6 provides a new data structure, Set, which is similar to an array, but the values of the members are unique and there are no duplicate values; Set itself is a constructor that generates the Set data structure. Array de-duplication…

Take a look at the ES6 unarrow function

Basic Grammar Shorter expressions There is no separate this Before the arrow function appears, each new function defines the this value of this function according to how it was called. If the function is a constructor, this pointer points to…

What is Promise? What are the parameters? how to use?

Noun convention In general, there are the following noun conventions. Promise (lowercase initials) object refers to “Promise instance object” Promise initial capitalization and singular form for “Promise constructor” Promises is capitalized and pluralized to refer to the “Promises specification” So…