2021.12. 20 Monday, 12 day_11 js Notes

1. Review of Knowledge Points  1. flex : 1   -> flex: 1 1 auto ; ( flex-grow ; flex-shrink ;  flex-basis) 2. Array to string join() 3. String to array split() 4. Get Year () 5. Month pushed to next month setDate(32-58)                                 setDate(1-28)   setMonth(getMonth()+1)  There is a bug setMonth(getMonth() ...

Added by defect on Tue, 21 Dec 2021 16:51:00 +0200

Long story short JavaScript understanding iteration

Many people say that loop, sometimes you forget the iteration. Iteration is to execute a program repeatedly in order, and generally there will be clear termination conditions. It's not the same thing as loop. Loop is the basis of iteration. Iteration has two conditions You need to know how to use the data structure before iterating.Traversal o ...

Added by big.nerd on Mon, 20 Dec 2021 13:49:23 +0200

13 lines of JavaScript code make you look like a master

Javascript can do many magical things, and there are many things to learn. Today we will introduce some short and concise code segments.Gets a random Boolean value (True/False)Using math Random () will return a random number from 0 to 1, and then judge whether it is greater than 0.5. It will get a value with a 50% probability of True or Falseco ...

Added by xenophobia on Sun, 19 Dec 2021 00:29:14 +0200

Wechat applet one week introduction - conclusion - production of movie details page

Previously: Wechat applet learning journey - production of the first page Wechat applet learning journey - making your own applet based on zero - making the second page Wechat applet learning journey – improving pages page – learning Font Icon, data binding, condition / list rendering, event / catch/bind and routing Wech ...

Added by NerdConcepts on Fri, 17 Dec 2021 08:09:27 +0200

[JavaScript] extension of ES6 string

character string String processing in ES5 The string template output of ES5 usually uses + splicing let name = "superman"; let age = 18; let str = "full name:" + name + ";Age:" + age + "year"; console.log(str); // Name: superman; Age: 18 String template for ES6 Enclose with ` ` and you can wrap at willWhen representing multiline strings, ...

Added by thewabbit1 on Thu, 16 Dec 2021 07:36:40 +0200

js array method summary

catalogue 1. push() 2. pop() tail deletion 3. unshift() header 4. shift() header deletion 5. splice() deletes multiple data and can add data 6. concat() connects multiple arrays 7. str.split() converts a string to an array 8. sort() sort 9. reverse() inverts the array 10. slice() intercepts array 11,forEach(callback) 12,map(callback ...

Added by polarbear66 on Tue, 14 Dec 2021 23:38:04 +0200

Learn basic JavaScript grammar in seven days (day07)

JavaScript basic syntax 07 catalogue • traversal of objects • built in objects • comprehensive cases I Traversal object Syntax: Generally, it is not used to traverse arrays in this way. It is mainly used to traverse objects Remember: K is the attribute name of the object, and the object name [k] is the attribute value For e ...

Added by dyluck on Mon, 13 Dec 2021 11:12:35 +0200

js inheritance method

Prototype chain inheritanceThe most common inheritance methods involve constructors, prototypes, and instancesEach constructor has a prototype objectThe prototype object also contains a pointer to the constructorThe instance contains a pointer to the prototype objectThere are problems with this inheritancefunction Parent(){ this.name="parent" ...

Added by Spud_Nic on Sat, 11 Dec 2021 14:30:56 +0200

js data type sorting, detection and conversion

Data type sortingjs data types are 8Basic type undefined,Null,Boolean,String,Number,Symbol,BigIntThe reference data type is Object, and the common reference types are array, regexp, date, math and function.The basic data type is stored in the stack memory. When it is referenced or copied, it will create variables that are exactly equal to the m ...

Added by djcubez on Sat, 11 Dec 2021 10:23:01 +0200

Day05 - basics of JavaScript functions

function Function function Function: put the code of the same function together Function: encapsulation + reusability Function classification: 1. System function () 2. User defined function Function: it is a tool that can be reused. Some functions have parameters and some do not. Such as math random(),alert(666) Syntax of function: Funct ...

Added by crag on Fri, 10 Dec 2021 18:28:16 +0200